I'm working with Zend 1.8. I've set the default timezone to Europe/Helsinki, and I'm parsing a string that looks like this:
2009-08-06
with a statement like this:
new Zend_Date($dateStr, 'YYYY-MM-dd');
It produces a date like this:
object(Zend_Date)#53 (8) {
["_locale:private"]=>
string(5) "en_US"
["_fractional:private"]=>
int(0)
["_precision:private"]=>
int(3)
["_unixTimestamp:private"]=>
string(10) "1249502400"
["_timezone:private"]=>
string(15) "Europe/Helsinki"
["_offset:private"]=>
int(-7200)
["_syncronised:private"]=>
int(0)
["_dst:protected"]=>
bool(true)
}
So it apparently knows the time zone. However, when I try to get a string representation of the date, what I get isn't 2009-08-06, but instead 2009-08-05 11:00:00 PM -- the UTC time. What gives?
Edit: I added an answer as well, but the cliff notes versio is, Zend_Date::getDate() is broken, not the parsing or printing bits.