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  


 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!