* __Time Zone__: The *time zone* is a social/political/geographical construct; within some geographic zone, there is a shared norm for tracking time.
* (_Ex: "The adjacent states of Iowa, Missouri, and Illinois follow the exact same rules for tracking time. They are in the same `US/Central` timezone."_)
* __Time Offset__: The *time offset* is a numerical value (eg `+0400` or `-0200`). To convert between timezones, you need to identify the relevant offsets.
* (_Ex: "During winter 2020, the `US/Central` timezone uses an offset `-0600`; during summer 2020, it uses `-0500`."_)
* __Time Perspective__: Dates and times are subjective; the same date/time can present with different values depending on one's timezone. While there are many possible perspectives on an `Event`, we define three key perspectives:
* The __nominal__ date/time perspective would appear on a printed pamphlet when advertising an `Event`. This is expressed in the *event-specific timezone*.
* The __canonical__ date/time perspective would drive automated processing (notifications, sorting, etc) on a shared/central server. This is expressed in a *universal timezone* (eg UTC/GMT).
* The __personal__ date/time perspective would appear when you lookup a webinar on the calendar of your personal smartphone. This is expressed based on the attendee's timezone.
## Event-TZ v1: Original changes
The Event time zone change set from included:
@@ -13,9 +26,12 @@ The Event time zone change set from included:
The TIMESTAMP conversion was done so that the front-end interface would require no changes in order to continue working with unknown systems that were not aware of the timezone change (i.e. the event time would appear in the system timezone, but be stored as UTC). This can not be automatically added to the DAO, so systems bypassing the API and BAO work under the assumption that they're in the CRM timezone or the timezone doesn't matter.
## Proposed solution
## Event-TZ v2: Proposed solution
totten suggests leaving the existing start and end dates ~~as is~~ _in their original form_ (`DATETIME` expressed in _nominal/advertised_ TZ), and adding additional columns with the offset information in a decided timezone. This will work best for the consideration of "systems bypassing the API and BAO work under the assumption that they're in the CRM timezone or the timezone doesn't matter."
The start and end dates have traditionally provided the _nominal perspective_ (*the date/time advertised on a printed pamphlet*). These fields should stay in their original form (`DATETIME`, nominal). Additionally, new columns should (1) store the nominal timezone (`event_tz`) and (2) store the canonical time. This has a few merits:
* It provides backward-compatibility for [relevant screens/tools/APIs](#affected) -- by returning the start and end dates in the same way. (_If you call `Event.get +w id=4 +s start_date` in v5.30 and v5.60, you should get the same value._)
* Screens may be updated incrementally to give richer information (using any of the columns, depending on the downstream goals+preferences).
Changes required to support timezones:
@@ -37,6 +53,7 @@ Changes required to support timezones:
7. Changes to various system workflow message to display timezone information with event messages †
8. Additional fields to the API to show the event timezone †
† Already implemented in original PR
†† Implementation in original PR exists, but will need adjustment
@@ -45,25 +62,6 @@ Changes required to support timezones:
TODO: Document the various Test Cases required, including the DST edge cases.
## Potential Impact on Wider CiviCRM Ecosystem.
With the plan to add new columns, the only relevant impact here should be that a timezone field and GMT datetime fields become available to allow timezone considerations.