|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74671 DST timezone abbreviation has incorrect offset
Submitted: 2017-05-29 14:17 UTC Modified: 2022-05-20 14:31 UTC
Avg. Score:3.4 ± 1.0
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:4 (80.0%)
From: ewgenij dot starostin at fondsnet dot de Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 7.1.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
36 - 20 = ?
Subscribe to this entry?

 [2017-05-29 14:17 UTC] ewgenij dot starostin at fondsnet dot de
When using a timezone abbreviation (e. g. CEST) instead of a geographical timezone name (e. g. Europe/Berlin) in the DateTimeZone constructor, the resulting time offset is that of the corresponding non-DST timezone, coming up an hour short.

Test script:
$dt = new DateTime(
    new DateTimeZone('CEST')

Expected result:
object(DateTime)#1 (3) {
  string(26) "2017-05-16 10:11:32.000000"
  string(4) "CEST"
string(25) "2017-05-16T10:11:32+02:00"

Actual result:
object(DateTime)#1 (3) {
  string(26) "2017-05-16 10:11:32.000000"
  string(4) "CEST"
string(25) "2017-05-16T10:11:32+01:00"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-30 09:14 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2017-05-30 09:14 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

From the docs[1]:

| The behavior of timezones not listed here is undefined.

[1] <>
 [2017-05-30 10:12 UTC]
-Status: Not a bug +Status: Assigned
 [2017-05-30 10:12 UTC]
No, this is a bug. This should work properly. Although it should *not* adjust for DST changeovers.
 [2017-06-01 18:31 UTC]
-Assigned To: cmb +Assigned To:
 [2022-05-20 14:31 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: derick
 [2022-05-27 13:29 UTC]
Automatic comment on behalf of derickr
Log: Fixed bug #74671 (DST timezone abbreviation has incorrect offset)
 [2022-05-27 13:29 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 11 02:05:45 2022 UTC