Setting a Default Timezone in PHP


Set the default timezone for all date/time functions in your script.

Source Code

date_default_timezone_set('UTC');
echo date("Y-m-d H:i:s"); // Outputs the current time in UTC
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments