PDA

View Full Version : Can I change the timezone for my account?


esc
07-28-2005, 02:34 PM
As far as I can see (using 'date' from the shell) the timezone of the server is set to EDT. How do I change this to UTC or better to CEST? I have a Typo3 installation and want to get either UTC or CEST timestamps in the Typo3-logs. As Typo3 reads its zone information via php there might perhaps be a way to change the process environment or some php.ini settings.

Erich

Arthur
07-28-2005, 04:10 PM
Hello Erich,

The timezone setting is a global setting for the server, it is not possible to set it to something different for an individual account.
If Typo3 can't handle timezones, you could try tweaking it a bit by changing the timezone environment variable and setting it to the desired value. For example, you could do; putenv("TZ=CET");
HTH,
Arthur

Rich
07-28-2005, 08:03 PM
Your application should provide the option to log in UTC time independent of the time the server is set to . This is also the preferred way to log since it is then not subject to any particular time zone's Daylight Saving Time rules.

esc
07-29-2005, 03:12 AM
Thank you Arthur and Rich for your comments!

Typo3 is a very modular system. There’s a core engine and a lot of modules which you can install with a button click from an online repository. Even the start-up package includes a bunch of preinstalled loadable modules.

As far as I’ve seen in the developer lists of the system, the timezone problem is not resolved satisfactorily for now. This will be re-addressed in one of the coming releases and should be done very low level of course.

There is one solution for all the user installed modules but this seems not to influence the administrator logs. Therefore my idea to put them either on UTC or (second option) to the current local time, as I always start wondering if I look into them (“What the hell ...”) and then realize that I have to add the 6 hours difference between EDT and CEST. What things make even more complicated is that I have several Typo3 installations on different servers which are on UTC.

I probably could just hack into one or several of the many php files as Arthur seems to suggest and change the timezone-settings of the current process environment (putenv() will do this, doesn’t it?) but the chance is very high that I might break the system, even without noticing it. There are lots of functions inside which rely on a timestamp, starting from log-entries, versioning and rollback, time-based page and content publishing and withdrawing, calendars, etc.

My idea was that there exists a per account setting of the timezone on Linux or perhaps some php.ini options or similar. But I couldn’t find them on the web and in the manuals. Obviously there are none as Arthur explained.

Erich