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.

Help with Dates in EE.

April 20, 2011 5:19am

Subscribe [2]
  • #1 / Apr 20, 2011 5:19am

    Mike Bray

    11 posts

    Hi,

    I have a channel which has a field containing a date in it. When I pull that value from the database and display it, it is actually displaying the day before.

    I.e. in the EE publish thing I select 22nd May 2011 9:00AM and when I pull it out of the database it displays 21st May 2011.

    <?php print date( 'D d F Y', $event_date); ?>

    With $event_date being pulled from the related entry in the database. I imagine that this has something to do with timezones? How do I set it up so that it doesn’t factor in Time Zones etc at all. If I save something as 22nd May 2010 and then pull it out using the php date function I want it to be the exact same time that I entered…

  • #2 / Apr 20, 2011 7:02am

    John Henry Donovan

    12339 posts

    Mike,

    Do you get same date if you use the native EE date formatting?

    {entry_date format="%F %d %Y"}

    What version and build of EE are you using?

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

ExpressionEngine News!

#eecms, #events, #releases