TireSwingSoftware/openassign-server — Issue #25: Event Date Timezone Not Considered
Author: mhrivnak
Created: 2011-10-18 19:31:35+00:00
State: open

Create an event. The end time is stored as a date with no time zone specified. Now try to create a session that ends on the end date of the event at 10PM -4:00. The back end sees this as 2am UTC on the day after the event ends, and raises a validation error like so:

{'status': 'error', 'error': [121, u'A validation error occurred: {\'end\': [u"ending time 2011-10-25 02:00:00 is not before or on event\'s ending time 2011-10-24"]}', {'messages': {'end': [u"ending time 2011-10-25 02:00:00 is not before or on event's ending time 2011-10-24"]}}]}

Handling timezones is tricky. The current strategy is that all back-end dates and times are stores as UTC. The UI at least knows the timezone of the client machine and automatically translates to UTC when sending to the backend. Making the backend aware of what timezone goes with a date could be a real hassle.

I think the best way to accommodate this is to allow sessions to start and end within 12 hours of the start and end dates for their event. The UI can do a better job of restricting within a timezone.