Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.4.9
-
-
Empty show more show less
-
Yes
-
Saigon 75, Saigon 77, Saigon 78
-
8
Description
We should investigate into time zone corner cases as switching from winter to summer time and CET vs CUT time calculations:
From the support ticket:
Nr1:
if one is entering a date for the winter time in a date (time) control, the time is stored incorrect (-1 hour) in jcr.
for example:
date '2016-10-30 12:00' will be saved as '2016-10-30T11:00:00.000+01:00'
another example:
entering date (without time) '2016-10-31' is stored as '2016-10-30T23:00:00.000+01:00'the problem is when displaying the previously set date using freemarker some_date?string('dd.MM.yyyy'):
the output is '30.10.2016' instead of '31.10.2016'.
this change apparently caused by 5.4.7, prior to this version it was printed correctly.you can reproduce it using the travel demo:
edit a tour in the tours app
set a date for wintertime 2016-10-31 & save
edit /tours/templates/components/tourDetail.ftl to display the tour date using freemarker $Unknown macro: {tour.date?string('dd.MM.yyyy')}edit the TourDetailModel as well, currently it's not returning the date
the output will be '30.10.2016' (-1 hour & -1 day)
Nr2:
Yes it's right that the date will be strored in iso time format with offset but it's not correct, if I'm entering time 12:00 CET in the dialog and in jcr the date is stored 11:00 CET. Although server and browser uses same timezone.
If the browser uses a timezone with daylight saving time the magnolia timezone handling is broken.And then it's dependent to summer and winter time which date/time I'll see in the date field of an dialog.
Example:
Today (in summer time) I'm entering a date in winter time ('2016-10-31') and then I will open this entry in the same dialog on the 31th of october the date in the date field will switch to '2016-10-30'.
It cannot be right.IMHO the problem is magnolia only uses offsets and ignores the timezone.
Browser and Server using CET. The stored date is winter time (offset +1) and the browser uses summer time (offset +2). There is the difference of one hour. But what happens if I open the date in winter time? Browser offset +1 and stored date offset +1. Now there is no difference and that's why I see different times in date fields.
Checklists
Attachments
Issue Links
- is cloned by
-
MGNLUI-4007 Wrong timezone calculation in DateFieldFactory
-
- Closed
-
- is duplicated by
-
MGNLUI-4061 info.magnolia.ui.form.field.definition.DateFieldDefinition seems not to work correctly around summertime/wintertime change.
-
- Closed
-
- relates to
-
MGNLUI-2694 Dates and times should be displayed in a configured timezone to not confuse user
-
- Closed
-
-
MGNLUI-2695 User can configure his timezone
-
- Closed
-
- mentioned in
-
Page Loading...