ZF-12043: print new Zend_Date(); does not print timestamp but a formatted date

Description

Hello, documentation at http://framework.zend.com/manual/en/… says this

$date = new Zend_Date();

// Output of the current timestamp print $date;

I tried it and it printed a formatted date, not a unix timestamp as I had expected. Btw. idk why this box keeps shrinking as I am typing...

Comments

I think the wording of that section is just misleading. To me it's saying it gets the UNIX timestamp from {{time()}} if no constructor arguments are passed, not that it returns one when you print it. The word "timestamp" refers to the act (ie: stamping an item with the current date/time) and not to the formatting. If i'm reading the code correctly, the default behaviour of Zend_Date is to print a date/time string formatted based upon the locale set (See {Zend/Date.php L461|http://framework.zend.com/code/blame.php/…]).