time increment

Discussion in 'PHP' started by skeemo, May 26, 2010.

  1. #1
    I'm using
    $today = date('m-d-y H:i');
    to get and write to a file the date and time a user logs in.
    My host server is in US Central time zone - I am in Eastern. I need to increment the hour +1
    How can I do that?
     
    skeemo, May 26, 2010 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    date('m-d-y H:i',strtotime("+1 Hour"));

    You may be able to change the time via htaccess which is a lot easier. You would put:

    SetEnv TZ America/Chicago

    In your htaccess file.
     
    jestep, May 26, 2010 IP
  3. n3r0x

    n3r0x Well-Known Member

    Messages:
    257
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    120
    #3
    n3r0x, May 26, 2010 IP
  4. skeemo

    skeemo Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks! Works perfectly.
     
    skeemo, May 26, 2010 IP