ZF-3198: Errors in Zend_Date document

Issue Type: Docs: Problem Created: 2008-05-05T13:57:27.000+0000 Last Updated: 2008-09-02T10:39:15.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: TAKAGI Masahiro (takagi) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


I found two problems in Zend_Date document.…

  1. typo 'date_defaut_timezone_set' should be 'date_default_timezone_set'.
  2. ISO-8601 uncompliant data '10.03.2007 00:00:00' should be '2007-10-03 00:00:00'.

Here is a patch for Zend_Date-Additional.xml

Index: trunk/documentation/manual/en/module_specs/Zend_Date-Additional.xml

--- trunk/documentation/manual/en/module_specs/Zend_Date-Additional.xml (revision 9385) +++ trunk/documentation/manual/en/module_specs/Zend_Date-Additional.xml (working copy) @@ -295,10 +295,10 @@

// Set a default timezone... this has to be done within the bootstrap file or php.ini // We do this here just for having a complete example -date_defaut_timezone_set('Europe/Vienna'); +date_default_timezone_set('Europe/Vienna');

// create a date object -$date = new Zend_Date('10.03.2007 00:00:00', Zend_Date::ISO_8601, 'de'); +$date = new Zend_Date('2007-10-03 00:00:00', Zend_Date::ISO_8601, 'de');

// view our date object print $date->getIso();


Posted by Thomas Weidner (thomas) on 2008-05-07T05:55:35.000+0000

The second is not a fault, it's expected and works. The real ISO standard defines also this sort of input as correct.

Posted by Thomas Weidner (thomas) on 2008-05-07T07:12:43.000+0000

Typo fixed with r9396

Posted by TAKAGI Masahiro (takagi) on 2008-05-07T15:09:00.000+0000

When I try Example 9.22 (*1), I expect the output is

2007-10-03T00:00:00+02:00 2007-10-03T00:00:00+02:00 2007-10-02T17:00:00-05:00 2007-10-02T17:00:00-05:00

But the actual result is

1970-01-01T00:00:00+01:00 1970-01-01T00:00:00+01:00 1969-12-31T18:00:00-05:00 1969-12-31T17:00:00-06:00

Is it the docu's bug or Zend_Date's?


Posted by Thomas Weidner (thomas) on 2008-05-12T13:18:11.000+0000

Typo fixed in r9447

Posted by Wil Sinclair (wil) on 2008-06-15T20:44:08.000+0000

Changing to comply with new IT coventions for components.

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:15.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 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.