Re: php date bug ?

From: Date: Fri, 03 Aug 2001 15:37:32 +0000
Subject: Re: php date bug ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61152@lists.php.net to get a copy of this message
Just to throw one more unwelcome cat amongst the pigeons.. Different countries/time zones have summer time, I think almost all countries do, but the actual days when they switch vary from country (yes I know, bloody nusiance isn't it?) I know as an example of this theres about three weeks of the year where new york is 6 hours behing UK, and the rest its only 5. HTH ----- Original Message ----- From: "Johnny Nguyen" <johnny@zugara.com> To: "Steve Brett" <steve.brett@e-mis.com>; <php-general@lists.php.net> Sent: Friday, August 03, 2001 4:25 PM Subject: RE: [PHP] php date bug ? > 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:steve.brett@e-mis.com] > Sent: Friday, August 03, 2001 7:56 AM > To: php-general@lists.php.net > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#61152) next »