ez.no / ezpublish / documentation / customization / tips & tricks / adjust timezone
These documentation pages are no longer maintained. Please visit the new documentation site.
If you are using a web host provider which locates in another timezone, you probabaly want to adjust your timezone to use your own.
The simpliest way to do this at present (as long as ezpublish do not support this adjustment of timezone in its kernel, I tried to figure it out) I come up with is as follows:
For I live in UK, using GMT, and my host provider is in US/Pacific timezone, I added these two line to the top of index.php (before the line "$scriptStartTime = microtime();")
if(date('T') != 'GMT') putenv("TZ=GMT");
of course you should adjust above lines to meet your needs.
This approach does not require you to change each template files
Comments
other timezones than GMT
Guglielmo Celata
Tuesday 12 July 2005 3:37:48 pm
the hack seems to work in other zones than GMT, as suggested.
I used putenv("TZ=Europe/Rome") to have the correct timezone in Rome, Italy.
This should also take into account daylight saving time switches automatically.
Guglielmo