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 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Windows and gmdate()

    The folloing code:

    Code:
    <?php echo gmdate("g:i a j M Y",SI_getFirstHit()+(((gmdate('I'))?($tz_offset+1):$tz_offset)*3600)); ?>
    generates the following error on an IIS server:

    Warning: gmdate(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970



    Does anybody know how I could modify that to get around this, and also why this error occurs?

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,095
    Thanks
    11
    Thanked 101 Times in 99 Posts
    what is the value of ..

    echo SI_getFirstHit()+(((gmdate('I'))?($tz_offset+1):$tz_offset)*3600);

    ? can only assume that this valus is not a valid timestamp on windows e.g. < 0
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Heh...

    Turns out I missed the "on switch" of the program I was trying to run, so that the query it should have made to create the date value to grab never happened. Hence the invalid value.

    I am smrt.


  •  

    Posting Permissions

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