Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a4

Bug #1640 Date_TimeZone doesn't recognize 'EDT'
Submitted: 2004-06-15 02:54 UTC
From: php040604 at awks dot org Assigned: danielc
Status: Closed Package: Date
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


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:
MUST BE VALID
Solve the problem : 25 + 39 = ?

 
 [2004-06-15 02:54 UTC] php040604 at awks dot org
Description: ------------ Date_TimeZone uses UTC instead of EST when the timezone name is "EDT". The fix is to create an entry for EDT alongside EST and EST5EDT in the code. By the way, have you considered making each timezone entry a separate file, such as a short .ini file, and just have Date_TimeZone load that one file whenever a timezone is loaded? For instance, if "America/Thunder_Bay" is the timezone, it would load data from: "Date/timezone-data/America/Thunder_Bay.ini" and so forth. That way the code wouldn't have to parse and carry around the full array of timezones. Reproduce code: --------------- require_once 'Date/TimeZone.php'; $dtz = Date_TimeZone::getDefault(); $php_tz = date('T'); // on my machine this returns 'EDT' $pear_tz = $dtz->getShortName(); print("$php_tz =? $pear_tz\n"); Expected result: ---------------- EDT =? EST Actual result: -------------- EDT =? UTC

Comments

 [2004-06-15 17:04 UTC] pierre at dotgeek dot org
Which version of Date (package version)? --Pierre
 [2004-06-16 08:03 UTC] php040604 at awks dot org
version is 1.4.3
 [2005-01-05 18:47 UTC] danielc
Fixed in CVS.