Forum Moderators: phranque
have a problem with the %Z option, donīt know the correct use of it. What i have is
<!--#config timefmt="%d.%m.%Y, Uhrzeit: %H.%M"-->
<!--#echo var="DATE_LOCAL"-->
That gives me
31.12.2003, Uhrzeit: 12.00
and that is not correct, the time is 11.00.
I canīt change the serverīs local time, so i tried to change the time via the %Z option, but it wonīt work and i couldnīt find a solution with google. How must i write the SSI directive to display the correct time?
Thanks in advance
Markus
The %Z option is used to display the name of the servers local time, for example, "EST" for Eastern Standard time in the U.S. It does not affect the offset from universal time to server time.
Server time ("local time") is always calculated for the server's location, not the user's or the webmaster's.
There are couple of solutions I can think of right away, neither of which are as easy as you'd probably like.
First, you can use client-side JavaScript to display the user's true local time (as long as their PC clock is correct). This won't work for users with JavaScript disabled. If the user has JS disabled, display the server local time using SSI, and mark it with %Z so that users can see that the time is the server time.
A second approach would be to write your own server-side time script or use one that someone else wrote that takes into account your local time offset. This problem comes up a lot, so try a search of CPAN and other script archives.
Jim