Path

ez.no / ezpublish / documentation / customization / tips & tricks / adjust timezone


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

Hi,
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

Contents

Customization

Access control
eZ publish API Documentation
Content structure
Custom design
Components
Tips & Tricks
    Debugging templates
    Javascript in templates
    Fetching current user
    Showing related objects
    Show which templates are used
    Fetching the ID of the parent
    One Article Folder
    Creating tree menus
    How can I use my own php script insid...
    Hiding attribute content
    Splitting an article over several pages
    Accessing section id in pagelayout
    List articles in folder
    Creating nice URLs
    Alt tag on images
    Improve the pagelayout.tpl
    Clean HTML tags
    Insert javascript call inside ezpub d...
    3rd party applications
    Fetch Function examples
    Display more than 15 items on your co...
    Including PHP files in templates
    Redirecting after content publishing
    HowTo see if article has an image
    Date and Time Formats
    Forms processing example: store user...
    Adjust Timezone
    Adding a Remove Button/Image
    Find the age in years for an object
    Editing, creating and removing conten...
    Indexing binary files with IFilters o...
Troubleshooting


Created

24/02/2004
6:23:33 pm
by liu spider

Last updated

11/03/2004
5:05:31 pm
by liu spider

Authors

liu spider



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.