[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Request for recommendation concerning timezone  XML
Forum Index -> Development
Author Message
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

All our clients and servers are in the same timezone. Just for extra safety, I set so far the timezone attribute for every calendarfield to "Europe/Paris". But now I have realized that this isn't the timezone on the servers, which is CET. I have noticed that because I ran into a java bug which shifts dates in seldom date periods (i.e. dates in the year 1976). For instance, if the user enters 1.9.1976, this is converted to 31.8.1976. This bug is described in http://lists.cocoondev.org/pipermail/daisy/2007-November/007872.html. As mentioned, the error only happens if the time zone for client and server are different.

So in my case that all is in the same timezone, the solution is to set for every calendarfield either CET or no timezone attribute. Finally, here my question: What is the better solution? I guess that it is better to set no attribute, in case the server timezone would change. But I am not sure, time zone issues seem to be quite tricky...

Regards, Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi Daniel,

you definitely need to somehow set the client timezone, so that is 100% in sync with the server timezone manageent. This is the only way leading to consistent treatment of point of times.

There are multiple ways you can do this:
(.) You really set the timezone explicitly per component
(.) You use a style to do so.
(.) From next Monday on there is a client paramter "timezone" in which you can globally set the default client time zone (all components go back to the default if no timezone is defined.

SO, if your server processing is using CET, then make sure that all time related information also is related to CET.

The worst...: leaving everythin "null"/default - then the timezone of the client may be different from the server timezone, and you are never sure at client side about how a date is translated into a calendar...

Björn


Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

The global parameter timezone works fine for format = date. But I suspect that it doesn't work for format = time. Can you confirm that?

Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi,
it also works (should work) for time.
Did you find problems there - or is it a more theoretical assumption?
Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

I had a problem, but now I found the reason. Sorry for inconvenience.
I am displaying time durations on the client. When my server calculates e.g. new java.util.date(0), the instance has 1 hour plus. I think this is because my server is CET. So the client displays 01:00. When I set client timezone to GMT, client displays 00:00 as desired.

Daniel
[WWW]
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team