Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-11-2004, 02:14 AM   PM User | #1
]|V|[agnus
Regular Coder

 
Join Date: May 2004
Location: Minneapolis, MN, USA
Posts: 904
Thanks: 0
Thanked 0 Times in 0 Posts
]|V|[agnus is an unknown quantity at this point
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?
__________________

Opposite of Sequitur
]|V|[agnus is offline   Reply With Quote
Old 10-11-2004, 04:01 AM   PM User | #2
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,890
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
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)
firepages is offline   Reply With Quote
Old 10-12-2004, 01:35 AM   PM User | #3
]|V|[agnus
Regular Coder

 
Join Date: May 2004
Location: Minneapolis, MN, USA
Posts: 904
Thanks: 0
Thanked 0 Times in 0 Posts
]|V|[agnus is an unknown quantity at this point
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.
__________________

Opposite of Sequitur
]|V|[agnus is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:26 PM.


Advertisement
Log in to turn off these ads.