Showing and setting event date time zones

There needs to be a way to set the time zone on Event start/end dates. Right now it's buried.. you have to set the TZ for the entire site via the Dates control panel, then edit/save the event date. There's no way to expose the TZ in the event date or set it explicitly, independently of having to change the site TZ. I don't know if there is a bug about that but I'd like to fix it...

I hereby acknowledge being lazy and not having searched yet to see if that is an outstanding bug, but I am putting it here partly as a reminder to myself.

@pbauer just told me "basically you change the date to a timezone-aware date"

There is no way to set the TZ on a per-event basis

That can't be true

So @pbauer and @zopyx are both right:

The datetimes are always stored with a timezone. And this is the only valid way to work with dates/datetimes. For recurring dates DST changes need to use the DST associated with the timezone stored with the date, because i.e. in Europe we have different DST boundaries than in US. So, a daily event at 11:00 in Europe would be for some weeks in US at 12 or 10 (depending on) or vice versa.

But the widget/ data converter does not support time zones. It always uses the default timezone

The default timezone is either the timezone of the portal, or if set, the timezone property of the currently logged in user:

So here is work to be done.

For the output of the date it even gets more complex and is really use-case specific, like show no timezone if there is only one, always show stored timezone, re-calculated to current logged in users timezone, recalculate to browser-selected timezone from request-parameter/cookie (there's nothing suitable by default in the request AFAIK) ... and possibly more.

1 Like

A simple (?) solution could be:

  • create a new widget that includes a timezone choice (so it does not rely on defaulting to a timezone)
  • always display the timezone on the events page template

Well, you do not need this always. A site for Austria wont need selection of a timezone. Also if in the US one might not need the timezones for Europe to Japan in the selection. So this needs configuration.

Same as above for output - and then (as mentioned in my post at the end) it also really depends on the use case and this would need complex configuration options as well.

The scenario is that a server has the default TZ of, say, US Central. A content editor creates an event with a physical location on the west coast, so would like to have the event use the US Pacific TZ, because otherwise the event start and end times as saved in the site and included in the downloadable .ics file will default to US Central.

Plone Foundation Code of Conduct