#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    3
    Rep Power
    0
    Hi, I have this piece of code to get this piece of code, but it returns the time as an hour behind what it should be. Can anyone tell me why and how I avoid it?

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    putenv("TZ=Europe/London");
    echo "Date ".date("d/m/Y H:i:s")." in ".getenv ("TZ")."n";[/code]

    Thanks.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    8
    Rep Power
    0
    I think that means the system time of the system your webpage is located on, is set wrong.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    3
    Rep Power
    0
    The time on the server is set to EDT and seems to be accurate to that time zone, the maillogs all accurate to EDT etc.

    Any ideas?

  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    8
    Rep Power
    0
    I haven't really got an idea of how those time zones are set, but i'm quite sure there's nothing wrong with your code.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    3
    Rep Power
    0
    Could this be something to do with the fact that we are operating on summer time which is an hour forwards? The time will be switched an hour back in winter so the times will then match up. Is there a way round this?

  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    8
    Rep Power
    0
    This is where my help stops ;(

    I haven't got a clue.

Similar Threads

  1. database date selection problem
    By kidsleep in forum MySQL Help
    Replies: 0
    Last Post: January 31st, 2004, 10:50 AM
  2. date addition problem
    By strange1 in forum PHP Development
    Replies: 3
    Last Post: October 6th, 2003, 04:01 PM
  3. Javascript date validation: advance to next valid date
    By TruckStuff in forum JavaScript Development
    Replies: 2
    Last Post: September 19th, 2003, 11:21 AM
  4. HTML Form not passing date value
    By XyberCom in forum PHP Development
    Replies: 14
    Last Post: September 14th, 2003, 01:18 PM
  5. problem using date as filter for record
    By FrequeNC in forum ASP Programming
    Replies: 4
    Last Post: September 9th, 2003, 04:56 AM

IMN logo majestic logo threadwatch logo seochat tools logo