Re: What's with 2016-11-06
| From: | Richard | Date: | Tue, 25 Oct 2016 14:25:33 +0000 |
| Subject: | Re: What's with 2016-11-06 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325773@lists.php.net to get a copy of this message | ||
> Date: Tuesday, October 25, 2016 14:10:21 +0000
> From: Cliff Nieuwenhuis <c.nieuwenhuis@adcidesign.com>
>
> This is a stripped-down version of a calendar program. Can anyone
> explain why November 6 2016 appears twice? Or 2015-11-01?
>
> I'm assuming the fault lies with
>
> $calday = $calday + (60 * 60 * 24);
>
> ...but I'd like to know why some days apparently have less than
> 86400 seconds and how (efficiently) to work around that.
>
DST. On both 2015-11-01 and 2016-11-06 the US switched back to
standard time.
Look at:
<http://php.net/manual/en/function.date.php>
I (capital i) Whether or not the date is in daylight saving time