Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    470
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Exclamation date() output 23 hours behind

    Using a UNIX timestamp for "June 26, 2007, 12:00:00 AM" I compared the output of two calls to the date() function. One on a Windows server running PHP 5.2.1 and another on a Linux server running 5.0.5. The output on the Linux server is 23 hours behind the output of the Windows server, showing "June 25, 2007, 1:00:00 AM".

    The code is identical. Only the PHP and Apache version and the operating system vary. Time zone is not a factor as this is a pregenerated integer value for a future date.

    What could be causing this discrepancy?

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    is it possible one of the setups isn't configured properly for daylight-savings?
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    470
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by GJay View Post
    is it possible one of the setups isn't configured properly for daylight-savings?
    Wouldn't that mean it would only be wrong by a single hour, not 23 hours?

  • #4
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    the US daylight-savings changed from its normal pattern this year though I believe, and computers that haven't been updated will be calculating incorrectly.
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •