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.

UTC Time for Weblog Entries

August 11, 2009 8:01pm

Subscribe [2]
  • #1 / Aug 11, 2009 8:01pm

    Craig S.

    12 posts

    I’m using a weblog for events, with the entry date as the start date, expiration date as the end date, etc.

    On my site I am creating a “add to google calendar” feature, but to do so I need to display the entry and expiration dates in UTC time, not with the localized time zone offset. Is there a way to do this? Maybe with PHP?

  • #2 / Aug 12, 2009 3:53am

    Ingmar

    29245 posts

    There is a native way to do this, actually, using {gmt_entry_date}.

  • #3 / Aug 12, 2009 12:54pm

    Craig S.

    12 posts

    What about a way to display the expiration date in gmt?

  • #4 / Aug 12, 2009 3:09pm

    Ingmar

    29245 posts

    I don’t think there’s a corresponding variable at this point, unfortunately.

  • #5 / Aug 12, 2009 3:16pm

    Craig S.

    12 posts

    Is there a way I could do this with PHP?

  • #6 / Aug 12, 2009 3:20pm

    Ingmar

    29245 posts

    Of course, almost everything can be done with PHP 😊 A quick way might be to determine the difference between local time and UTC, and add/subtract that yourself to/from your expiration date.

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

ExpressionEngine News!

#eecms, #events, #releases