Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very Wierd March Date problem

Status
Not open for further replies.

johnrg1

Programmer
Jan 24, 2003
38
0
0
GB
Hi All,

I am have been looking into why a script of mine does not work, when I came across i very strange error. My server does not like the day 29th March 2004. Then when i dig a little deeper, it turns out it does not like the last Sunday of March in any year.

Although I am able to format the date etc... when I comes to use mktime using the date parameters of the last Sunday in March, it always comes back with the saturday's date.

It treats it as day 6. then the monday is day 1.

Has anyone come across this problem before?

John.
 
It probably has something to do with the fact that in the E.U., Daylight Saving Time starts the last Sunday in March. I've come across problems with the date() function at the end of DST.

What version of PHP are you running?

Want the best answers? Ask the best questions: TANSTAAFL!!
 
I've got the most recent release. 4.3.4.

Any idea how to stop it?
 
Nope. You'll probably have to just work around it.

It may not be a problem with PHP at all, but with non-PHP-written supporting libraries. I don't know.

You might look around for some date-manipulation classes that don't use date().

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top