Am I formatting this correctly or is there a different format to use this correctly?
1 Answer
Sitecore applications and UI dialogs display date & time values in the server time zone. Therefore, you have to convert UTC date/time to server time using the ToServerTime()
method from the Sitecore.DateUtil
class. Also
when saving input from a date/time picker to the database ensure that the selected date/time value is converted to UTC before saving by using the IsoDateToUtcIsoDate()
method from the Sitecore.DateUtil
class.
More on the date/time best practices in Sitecore please read here.