ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Need a custom date field to be displayed in GMT

February 08, 2011 12:53pm

Subscribe [2]
  • #1 / Feb 08, 2011 12:53pm

    MasonH

    15 posts

    I’ve created a custom event system for a client, and it enables them to list the time and date on their site as well as provide Add to Google Calendar link and add to iCal/Outlook.

    I’ve successfully created all of the functionality, but I’m having a somewhat difficult time when it comes to time zones. They’re in California, and most of their events are in California, but some are web events, etc, and people from all over the country are probably going to join in. When they add the event to Google Calendar or iCal, it doesn’t interpret the time as PST, and would therefore be an incorrect time if you’re in New York. For example, an event is on Tuesday from 8am-9am PST. The New York user who wants to attend the online event adds it to their calendar but it shows up 8am-9am their time (EST).

    I’ve come to the conclusion that I need to display the time in GMT/UTC format. I know that there is a variable for the entry_date to do this - {gmt_entry_date}, but is there someway to do this for custom date fields? In addition, I need it to display in this format to be useable in the .ics file:  {event_date format="%Y%m%dT%H%i00Z"}

    Any insight would be much appreciated! I’ve scoured the Date Variable Formatting page found here: http://ellislab.com/expressionengine/user-guide/templates/date_variable_formatting.html and haven’t had any luck.

  • #2 / Feb 09, 2011 12:33pm

    e-man

    1816 posts

    Have a look at this add-on, it may come in handy:
    http://devot-ee.com/add-ons/hs-localize-date/

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases