Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Define timeZone on Phalcon

There is some function for define timezone ? or only use the datedefaulttimezone_set ?

I would just use the one you mentioned.

date_default_timezone_set($timeZone);

should work for any date functions.



12.2k
Accepted
answer
edited Apr '15

Yes

        $today = new DateTime();

        $today->setTimezone(new DateTimeZone('Africa/Nairobi'));

        $today = $currentDate->format('Y-m-d h:i:s');

You can play around it to make it suitable for your use.

thanks!>.. i used datedefaulttimezone_set($timeZone);