Notifications

36 views

Overview

You may see cases where Time or Date/Time fields are not being adjusted for DST on various records. This is because the expected behavior of Time and Date/Time fields may differ from your expectation. Regarding Time fields, these will never adjust for DST. This is stated in the Field Types documentation. Regarding Date/Time fields, the DST offset is determined based on the date half of the date/time value. If the date value represents a day on which DST was in effect in the current timezone, the offset will be applied. However, if DST was not in effect on that date, the offset will not be applied, regardless of whether or not DST is currently in effect.

Example

Let's say you are in the US/Eastern timezone, and today is March 20th, which would mean DST is currently in effect. Let's say you have a Time and a Date/Time field on the same form. The Date/Time field has an internal value 2019-03-20 16:00:00 GMT, and the Time field has an internal value of 16:00:00 GMT. Since your current timezone is US/Eastern, you would see the following values displayed on the form:

Date/Time field: 2019-03-20 12:00:00 (Offset by 4 hours, honoring DST)
Time field: 11:00:00 (Offset by 5 hours, not honoring DST)

This might be surprising to users who are expecting the DST offset to apply to both. Now let's say you adjust your Date/Time field to have the exact same time, but in January instead of March. The internal value of the Date/Time will now be 2019-01-20 16:00:00 GMT, and the values displayed on the form will be as follows:

Date/Time field: 2019-01-20 11:00:00 (Offset by 5 hours, not honoring DST)
Time field: 11:00:00 (Offset by 5 hours, not honoring DST)

That's because on January 20th in the US/Eastern timezone, Daylight Saving Time was not in effect. Thus, the displayed time in the field is offset by 5 hours instead of 4.

Additional Information

Article Information

Last Updated:2019-05-21 11:54:55
Published:2019-03-22