Last active
August 29, 2015 14:08
-
-
Save kramarama/1fcb2bae835b2ec1a6b4 to your computer and use it in GitHub Desktop.
PHP time zone fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install php-pear | |
sudo apt-get install php5-dev | |
sudo pecl install timezonedb | |
sudo su -c 'echo extension=timezonedb.so > /etc/php5/conf.d/timezone.ini' | |
sudo service apache2 reload | |
sudo sed -i -r 's~^;date\.timezone =$~date.timezone = "Europe/Moscow"~' /etc/php5/cli/php.ini | |
sudo sed -i -r 's~^;date\.timezone =$~date.timezone = "Europe/Moscow"~' /etc/php5/apache2/php.ini | |
php -r 'echo date("r");' | |
php -r 'echo date("H", time());' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment