Change/Set Default Timezone on XAMPP Server

To set the time zones see the directions under the corresponding sections. If you cannot find the time zone directive you can copy and paste it in the file. Your Time zone can be found on the php website.

  1. Navigate to the php folder (normally in \xampp\php) and edit the php.ini file.
  2. Under the [Date] section copy and paste your time zone in this format: date.timezone = "Atlantic/Faroe"
  1. Navigate to the MySQL bin folder (normally in \xampp\mysql\bin) and edit the my.ini file.
  2. Copy and paste your time zone in this format: default-time-zone = "Atlantic/Faroe"
  1. Navigate to the apache configuration folder (normally in \xampp\apache\conf) and edit the httpd.conf file.
  2. Copy and paste your time zone in this format: SetEnv TZ Atlantic/Faroe

ALL DONE!! Now you can restart Apache and MySQL servers and get back to business.

Leave a Reply

Your email address will not be published. Required fields are marked *