Forums

Formatting Date to Eastern Time (3 posts)

  1. Deadtail
    Member
    Posted 2 years ago #

    Howdy!

    I am having trouble getting the date into EST time. Right now, I am using this line of code:

    $comment_time = mysql2date(' F jS, Y @ g:ia', $comment->comment_date,false);

    The date that gets posted is 5 hours ahead of my time. I need to do it this way because I am not using the loop or else I would just call date(); Whenever I call date() in the loop, I get the correct time, but that's not what I need.

    Any help would be appreciated!

  2. songdogtech
    Member
    Posted 2 years ago #

    There's some tips on finding "ago" times in php at PHP: time - Manual

  3. chlankboot
    Member
    Posted 1 year ago #

    @songdogtech thanks, that solved also my problem

Topic Closed

This topic has been closed to new replies.

About this Topic