Issues

ZF-11846: Zend_Date->getTimezoneFromString() fails to recognize timezones greater than UTC+12

Issue Type: Bug Created: 2011-10-26T14:10:27.000+0000 Last Updated: 2012-05-22T14:54:02.000+0000 Status: Resolved Fix version(s): - 1.12.0 (27/Aug/12)

Reporter: Mason Malone (masonm) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Date

  • FixForZF1.12
  • state:patch-ready-for-review
  • zf-caretaker-adamlundrigan
  • zf-crteam-review

Related issues: Attachments: - ZF11846.diff

Description

getTimezoneFromString() assumes that all timezone offsets are between -12 and +12. However, there are several timezones with an offset greater than that, such as New Zealand DST (UTC+13) and Pacific/Kiritimati (UTC+14).

Test case: {quote} $a = new Zend_Date(); var_dump($a->getTimezoneFromString('18:00:00+1300')); {quote} Output: string(3) "UTC" Expected output: string(10) "Etc/GMT-13"

Comments

Posted by Mason Malone (masonm) on 2011-10-31T18:17:43.000+0000

patch

Posted by Adam Lundrigan (adamlundrigan) on 2012-05-22T14:54:02.000+0000

Fixed in trunk (1.12.0): r24812

See: http://en.wikipedia.org/wiki/UTC%2B13:00 http://en.wikipedia.org/wiki/UTC%2B14:00

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts