How can I force PHP to use the Local Time of Ubuntu server, and Not UTC?

How can I force PHP to use the Local Time of Ubuntu server, and Not UTC?
LVL 2
smetterdAsked:
Who is Participating?
 
OmniUnlimitedConnect With a Mentor Commented:
0
 
Ray PaseurConnect With a Mentor Commented:
Please see this article about handling DATETIME:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html

In particular, you might find Practical Application Number 8 to be responsive to your question.

And you can use this built-in PHP function
http://php.net/manual/en/function.date-default-timezone-set.php

HTH, ~Ray
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.