ALL SYSTEMS OPERATIONALUPTIME 99.97%FLEET 18/18IN-MUM · US-LAX · EU-FSN EST. 2003 · +91 11 4998 4038

KNOWLEDGEBASE · LINUX

PHP: Setting custom local time zone by PHP time offset

Last updated 2020-04-02

Server default time zone is CST, that is GMT-0600 currently. The time runs off the system-time, not account-time.

You can setup an offset from the server-time to your local-time, in the PHP scripts in your account, such that they display you local-time on browser outputs. One method of doing the same is to enter the following command in your scripts .htaccess to enable scripts to show local time zone for example

SetEnv TZ CDT-5:30
SetEnv TZ America/Indianapolis

For a list of valid options (time zone) goto http://in.php.net/manual/en/timezones.php

← All knowledgebase articles

Tell us what has to stay up.

A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.