DST not taken into account on display
Submitted AndyMillne, Apr 24 2012 02:11 PM | Last updated Feb 15 2013 12:34 PM
Member 1
Timezone GMT
DST in use
Member 2
Timezone GMT
DST not in use
If we add a calendar event at 6pm GMT, member 1 should see this event as 7pm and Member 2 should see it at 6pm.
What is happening is no dst offset is applied to the display time so both members see 6pm.
$this->memberData['time_offset'] which is applied to the display times is 0 for both of these users.
Outside of Calendar, when we use the parse date tag, the offset is applied in classLocalization::getDate() which accounts for DST. In Calendar we only use the time_offset in memberData.
Timezone GMT
DST in use
Member 2
Timezone GMT
DST not in use
If we add a calendar event at 6pm GMT, member 1 should see this event as 7pm and Member 2 should see it at 6pm.
What is happening is no dst offset is applied to the display time so both members see 6pm.
$this->memberData['time_offset'] which is applied to the display times is 0 for both of these users.
Outside of Calendar, when we use the parse date tag, the offset is applied in classLocalization::getDate() which accounts for DST. In Calendar we only use the time_offset in memberData.
| Status: | Will Fix - IP.Suite 4.0 |
| Version: | 3.3.1 |
| Fixed In: | 0 |











13 Comments
public_calendar_calendar_view::calendarGetEventsSQL()
None of these times are corrected to account for member DST settings, only the time zone offset.
This is going to require much more consideration than I originally anticipated, so I'm going to put it on hold for now. Technically, GMT-5 is GMT-5, whether you are in DST or not, so this is more an enhancement than a bug.
If I save an event for 7PM in GMT-5 right now, it shows as 7PM. If I take into account DST (which is enabled for me at the moment), that's going to change the time by an hour, even though I submitted it as 7PM in GMT-5. If we don't account for that on storage too, it will mean when I submit a time, it's not going to be accurate while DST is in effect.
It was I who started the ticket on this whole process and it is still posing quite a problem for us.
http://community.inv...ed-event-times/
Submit an event as 10:00PM GMT-5. Shows properly in Calendar (at least for you). We don't account for DST in displaying the events.
When you export the event, it is exported as GMT time (e.g. 03:00 GMT ... if you subtracted 5 from it, it would be 10:00 PM). The "problem" is that since DST is enabled, external sources (e.g. a browser) knows this and honors the hour offset for DST, making it display as 11:00 instead of 10:00.
I've been manually breaking what you store down into it's parts and running IPSTime::date_gmmktime on said parts, then passing it into parse date with checks for all day as to whether to show the time, and it appears to be correctly handling the DST in all cases... but I do loath inconsistency... is the consensus going to be to enforce or ignore it?
The changes required to resolve this are not suitable for a maintenance release. The issue will be fixed in the next major version.
-