We recently added support for timezones as well as date-only events (those with a date but no time yet defined) for events on Facebook to make it easier for friends to share events make plans together. Today, we are extending this support to our developer APIs.
Until recently, there was no good way to specify an event happening in a different timezone. Facebook Events used to be timezone independent, meaning people would specify a date and time for their event (e.g., July 4th, 2012 at 7:00 PM), and this would render identically to everyone, regardless of what timezone they were in. It was up to the person to infer what time the event actually started based on where it took place. This was problematic for friends who wanted to enjoy live events together, such as sporting events, which may start at 6:30 PM ET but 3:30 PM PT.
Starting today, the following changes will be made to our platform APIs to support event timezones. Any apps created as of today will automatically get timezone support. Existing apps may opt-in to timezone support by going to the App Dashboard, clicking on Settings > Advanced, and changing the 'Events Timezone' migration field to 'Enabled'. This is a 90-day breaking change; timezone support will be added to all apps in 90 days.
The following changes apply to the event and event_member tables.
Before 'events_timezone' migration:
start_time
and end_time
fields were UNIX timestamps in Pacific Time.end_time
was always defined.After 'events_timezone' migration:
start_time
and end_time
fields are ISO-8601 formatted strings.end_time
may be null if none was specified.The following changes apply to the Event object.
Before 'events_timezone' migration:
start_time
and end_time
fields were returned as ISO-8601 strings with no offset.end_time
was always defined.After 'events_timezone' migration:
start_time
and end_time
fields are ISO-8601 formatted strings.end_time
may be null if none was specified.The following changes apply to creating new events via the User object.
Before 'events_timezone' migration:
start_time
and end_time
could be any string accepted by strtotime.After 'events_timezone' migration:
start_time
and end_time
fields must be ISO-8601 formatted strings.
Date-only (e.g., '2012-07-04') Precise time with offset from UTC (e.g., '2012-07-04T19:00:00-0700').
Sign up for monthly updates from Meta for Developers.