Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
strtotime( "next Monday") daylight bug u php 4

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
sloser



Joined: 13 Jul 2007
Posts: 14

PostPosted: 26.10.2007 13:39    Post subject: strtotime( "next Monday") daylight bug u php 4 Add user to your forum ignore list Reply with quote

evo jedan zanimljiv bug u php4, na koji vjerujem da su rijetki naletili, jer nije bas lako doci do njega.

Naime, ako se radi strtotime( "next ...") ili strtotime( "last ...") i vrijeme koje je ubuhvaćeno uključuje vikend u kojme de dešava daylight i to daylight u kojem se oduzima sat (a to je baš idući vikend) dobijemo jedan dan manje.

npr kod:

$timestamp = strtotime( "next Monday");
echo date( 'Y-m-d H:i:s', $timestamp );

vraća:
2007-10-28 23:00:00

a trebao bi:
2007-10-29 00:00:00

Pa i nije nekakav strašan bug, s obzirom da se dešava samo jednom godišnje Smile
Back to top
View user's profile Send private message
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 26.10.2007 14:00    Post subject: Add user to your forum ignore list Reply with quote

hehe, naletio i ja prosle godine... :)
popiz... dok nisam skuzio o cemu se radi...

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group