php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13984 date(I) does not correctly identify daylight saving time
Submitted: 2001-11-07 16:05 UTC Modified: 2003-11-22 20:16 UTC
From: bmplummer1 at home dot com Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.6 OS: Windows NT/XP
Private report: No CVE-ID: None
 [2001-11-07 16:05 UTC] bmplummer1 at home dot com
From Bug #13900
date("I") does not identify if a date occurs during daylight saving time correctly.

[2001-11-06 00:20:42] jimw@php.net

if you want to check if a date occurs during daylight savings time, you have to set your
timezone to one that observes daylight savings time. (ie.
putenv("TZ=PST8PDT"))

there's no bug here.

---------------------------------------------------------

There may not be a bug but there is a issue here.  What about timezones that don't observe daylight saving time (Like the entire state of Arizona)?  Are the millions of us that fall under that category just out of luck?

By the way, Arizona is the home of the World Series Champion Diamondbacks!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-07 16:23 UTC] jimw@php.net
in a timezone that does not observe daylight savings time, there is no such thing as a time within daylight savings time. not all timezones that observe daylight savings time observe the same dates for time changes. so if you want to know if a particular data/time falls within daylight savings time *in a particular time zone* you have to set the timezone.

this is not a bug. this is not an issue. it is just how daylight savings time works.
 [2024-04-17 23:39 UTC] git@php.net
Automatic comment on behalf of SakiTakamachi
Revision: https://github.com/php/php-src/commit/fda91a054301605ac89049c13e2b3aba07e60319
Log: Fix GH-13984: Buffer size is now checked before memcmp (#13991)
 [2024-04-17 23:39 UTC] git@php.net
-Status: Not a bug +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC