M3Server Technical Blog Mini Howto set timezone per site

set timezone per site



Advanced method, use php:
php.net manualtimezone

Easy method, use htaccess.
Objective: Set tiemzone

Scenarios:

  • How to use a different timezone per site
  • Set your site to work in your timezone VS the local server time

WARNING. Improper use of htaccess or simple typo can render your site broken / inoperable. Don’t scream at your neighbor if you forget to make a backup of your file. Then, if things go wrong, you can just upload your original .htaccess file to the server. Backups are important, you have been politely warned.

Place this code at the top of your htaccess file:


php_value date.timezone "Europe/Istanbul"

Leave a Reply