Zend_Date and setting timezone on instation

1.5k Views Asked by At

I have a ZF app and am saving times as UTC in MySQL db. When I retrieve, them I'd like to tell Zend_Ddate that they are UTC rather than the timezone set in php.ini of 'America/Los Angeles'.

Currently, I'm instantiating like this:

$date=new Zend_Date($item['created_on_utc'],Zend_Date::ISO_8601,'en_US');

but feel like there should be a way to tell Zend_Date that is a utc Date. How would I do that?

thanks

1

There are 1 best solutions below

2
On BEST ANSWER

try the following:

date_default_timezone_set — Sets the default timezone used by all date/time functions in a script

date_default_timezone_set('Etc/UTC');