System Shutdown Times [message #1981] |
Mon, 06 April 2009 11:18 ![Go to next message Go to next message](/theme/default/images/down.png) |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Tony,
My system is hosted on a server that is in the US rather than in the UK. Is there any way to change the shutdown messages to cater for the time difference (otherwise the user sees a shutdown time that doesn't actually match the shutdown experience)?
Thanks
|
|
|
|
|
Re: System Shutdown Times [message #2116 is a reply to message #1981] |
Mon, 08 June 2009 12:23 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
gpatti
Messages: 283 Registered: August 2008
|
Senior Member |
|
|
Thanks Tony, I've tried this now.
It half solves the problem. If the user is logged in then they will see the shutdown times in the correct timezone if it is within the warning period. However, once the system is shutdown, they are be definition logged out, so the system displays the time the system is available again using the default server timezone. Not sure what the solution to this might be!
Similarly, if the user is logged out (e.g. coming to the login screen for the first time, or at the login screen having just logged out) and the time is within the warning period, then the times will not be in the relevant timezone. An easy get out solution to this is not to display the warning messages on these types of screens (login, password reminder etc), although I think that would be a shame.
Maybe you have a proper solution?
|
|
|
Re: System Shutdown Times [message #2117 is a reply to message #2116] |
Mon, 08 June 2009 13:50 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
This is tricky as I don't know the user's time zone until after he/she has logged on, but if the system is in a shutdown state then he/she cannot log on. There is no information available in the HTTP headers, but I've just tried a solution which I think will work.
When a user logs on I set a cookie called 'timezone_client', so this information will always be available on the logon screen. This assumes, of course, that the same device is not used by people in different time zones.
See the attached file for the changed scripts.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
Re: System Shutdown Times [message #2119 is a reply to message #2118] |
Mon, 08 June 2009 15:00 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
There is only one server time zone, and this is obtained using the date_default_timezone_get() function, although this can be overridden with the $GLOBALS['server_timezone'] variable in the config.inc file.
Advise your users not to disable cookies, at least for this one domain, and the setting for client timezone on each MNU_USER record will always be available and will always be accurate. This would make a default setting for the client time zone completely redundant.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|