Bug #64992 [Com]: dst not handled past 2038

From: Date: Tue, 28 May 2019 10:27:04 +0000
Subject: Bug #64992 [Com]: dst not handled past 2038
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221026@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64992&edit=1

 ID:                 64992
 Comment by:         spam2 at rhsoft dot net
 Reported by:        eclipsechasers2 at yahoo dot com
 Summary:            dst not handled past 2038
 Status:             Re-Opened
 Type:               Bug
 Package:            Date/time related
 Operating System:   Windows and Linux
 PHP Version:        5.4.16
 Block user comment: N
 Private report:     N

 New Comment:

well, stop to force using the bundeled one so that distributons can drop their systzdata patches, gd
fro example has now a build option while the php community fighted a decade against Redhat and
others which did it all the time


Previous Comments:
------------------------------------------------------------------------
[2019-05-28 09:44:36] derick@php.net

What would be an appropriate end time, considering that the more data we add, the larger the PHP
binaries will get.

------------------------------------------------------------------------
[2019-05-24 20:08:09] zane at collected dot team

I agree with mlambley, this shouldn't be an issue of political whims or safety of assumptions,
this should be about consistency. 2038 is only 19 years away, it is not unreasonable to get
information about dates and times that are that close. PHP is the backbone for a large percentage of
the internet, this is a major issue and needs to be fixed.


I'm working on a scheduling system that uses UTC timestamps and DateTime to create dates,
schedules, events, etc. But since PHP won't calculate DST past 2037 my site is literally broken
for my users. There are definitely workarounds for this, but that it literally the reason DateTime
exists...

------------------------------------------------------------------------
[2018-06-26 04:29:18] mlambley at gmail dot com

For me, the question isn't whether or not it "safe to assume so far in advance". The
fact is that my system is broken right now because PHP's behaviour is inconsistent.

My system receives a DateTime object with time zone, converts using ->format('c'), and
writes to the database. Beyond 2037, it records the date one day behind. Because instead of writing
midnight+10:00 it writes midnight+11:00 which is 11pm the previous night.

My workaround is to create another DateTime object with a fixed pre-2037 date, compare the time
zones, and adjust the date accordingly. It should not be necessary, because PHP's behaviour
should be consistent.

Thank you for your time and attention to this ticket.

------------------------------------------------------------------------
[2018-06-26 04:03:33] requinix@php.net

Related To: Bug #76530

------------------------------------------------------------------------
[2018-04-26 11:03:37] pmmaga@php.net

I agree with the reporter and Paul that currently, there is no good reason for PHP to keep this
behavior. It is an arbitrary restriction.

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=64992


--
Edit this bug report at https://bugs.php.net/bug.php?id=64992&edit=1


Thread (15 messages)

« previous php.bugs (#221026) next »