php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74824 Western European Summer Time (WEST) should be corrected in the timezone map
Submitted: 2017-06-28 17:38 UTC Modified: -
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: hfm dot anwa at gmail dot com Assigned:
Status: Open Package: Date/time related
PHP Version: master-Git-2017-06-28 (Git) OS: Any
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
27 - 16 = ?
Subscribe to this entry?

 
 [2017-06-28 17:38 UTC] hfm dot anwa at gmail dot com
Description:
------------
The function timezone_name_from_abbr returns an inaccurate result when WEST is provided as an abbreviation without further parameters. I think this is do to this map:
https://git.php.net/?p=php-src.git;a=blob;f=ext/date/lib/timezonemap.h;h=d8898bf33dc76b90b12b0f01d2e1b832d87d68b2;hb=refs/heads/master#l1510

This map should be updated. All non european timezones should be removed and Paris, Luxembourg, Brussels, Madrid and Monaco also, since they are not part of WEST.

Test script:
---------------
echo timezone_name_from_abbr('WEST'); // echoes Europe/Paris it should return Europe/Lisbon or other adequate result

Expected result:
----------------
Europe/Lisbon

Actual result:
--------------
Europe/Paris

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Dec 04 05:01:23 2020 UTC