Details
-
Bug
-
Resolution: Fixed
-
High
-
5.4.9, 5.3.11, 1.7.1.1, 1.8.0
-
None
Description
https://jira.ez.no/browse/EZP-26791 introduced a timestring (like "now", or "1 day, 2 hours") as the way to delay the initialisation of the datetime value until when you're creating it, rather than when the content type cache was last cleared (which was the bug).
This fails for DEFAULT_CURRENT_DATE_ADJUSTED because the adjustment is calculated by taking current time, adding the DateInterval, and comparing the resulting time with the original as timestamps, before making a timestring out of it. But timestamps do not care about DST (daylight savings time), so this will in some cases lead to off-by-one-hour bugs.
The fix is to instead format the timestring as containing all the properties of the DateInterval (years, months, days, hours, minutes, seconds, whether they are zero or not). By not translating to timestamps we avoid the bug.
Attachments
Issue Links
- discovered while testing
-
EZP-26791 Default value "Current datetime" for ezdatetime is wrongly cached
- Closed