1

I'm setting up cron jobs from my plugin and I need to format the date in the server's time zone. It looks like Craft is overriding the timezone set in php.ini because PHP's date_default_timezone_get() always returns UTC. Is there another way to get the actual timezone set on the server?

1

Use ini_get('date.timezone').

Source: http://php.net/manual/en/function.ini-get.php

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.