Issues

ZF-11786: Zend date behaves incorrectly with some timezones

Issue Type: Bug Created: 2011-10-01T12:41:10.000+0000 Last Updated: 2011-10-01T12:41:10.000+0000 Status: Open Fix version(s): Reporter: Fernando Morgenstern (fernandomm) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:

Description

Check the following code:

<pre class="highlight">// Default timezone set to GMT -4 - America/Santiago
date_default_timezone_set('America/Santiago');

$zendDate = new Zend_Date('16/09/2011', Zend_Date::DATE_MEDIUM, 'es_ES');
$zendDate->setTimezone('UTC');

echo $zendDate->get(Zend_Date::ISO_8601);

The returned value is 2011-09-16T05:00:00+00:00 while i expect to receive 2011-09-16T04:00:00+00:00. For some reason Zend_Date is adding an extra hour in this case.

I tested with other timezones like America/Sao_Paulo and it worked fine. Although i can't discard that with other timezones it may also fail.

Thanks!

Comments

No comments to display

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