Don’t use adding 86400 seconds in real life

February 21, 2011 PHP As Is

Consider the following example:

it will output:
2009-10-23
2009-10-24
2009-10-25
2009-10-25
rather than expected:
2009-10-23
2009-10-24
2009-10-25
2009-10-26
This is because of Daylight Saving Time, if you add hours :

it will output:
2009-10-232009-10-242009-10-252009-10-25
rather than expected:2009-10-232009-10-242009-10-252009-10-26
This is because of Daylight Saving Time, if you add hours :


Leave a Reply

Your email address will not be published