I'm in the exact same position.  It's definitely not a PHP problem.

The problem with the way you're redefining your timestamp is that you may
get January 32, June 31st, etc.

I'm tempted to simply check for spring-forward and fallback before I advance
the timestep, but that's one extra if statement as much as 31 times in one
month.  1000 people generating the calendar would create 31000 extra if
statements, unless I get a Cache solution.  There should definitely be a PHP
function for getNextDay(), but until then, I'm going to use the extra if
statement.

regards,
Johnny Nguyen

-----Original Message-----
From: Steve Brett [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 7:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php date bug ?


hi,

i've got a calendar and i produce a month sort of outlook / filofax view
that shows the user's appointments for that month.

the way i was building it was but defining ADAY in the following manner:

define("ADAY", (60*60*24) );

once i'd done evrything i needed to do i incremented the timestamp for the
day by ADAY.

all seemed ok but then one of the users pointed out that October 28th
appeared twice and then month had 32 days in for this year.

after a bit of head scratching we realised that the clocks go forward (any
foreign readers please excuse the rediculous way the british time system
works) and technicallay i guess october 24th has 25 hours. thus the time was
incremented to a stamp within the same day.

redfining the stamp as

$start3=mktime(0,0,0,$dayArray[mon],$dayArray[mday]+1,$dayArray[year]);

does work however ?

is it php or the server that's at fault ?

Steve



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to