Skip to content

Instantly share code, notes, and snippets.

@umidjons
Last active December 20, 2015 07:29
Show Gist options
  • Select an option

  • Save umidjons/6093986 to your computer and use it in GitHub Desktop.

Select an option

Save umidjons/6093986 to your computer and use it in GitHub Desktop.
Changing Timezone in php.ini
<?php
echo "TimeZone: " . date_default_timezone_get();
echo " Current date and time: " . date( 'Y-m-d H:i:s' );
// We also can set timezone at runtime
// date_default_timezone_set('America/Los_Angeles');
?>
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Asia/Tashkent"
; NOTE: after changing restart the web server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment