[jboss-user] [jBPM] - Re: Concept of different locales/time zones in jBPM5

Michael Wohlfart do-not-reply at jboss.com
Sun Sep 26 05:02:07 EDT 2010


Michael Wohlfart [http://community.jboss.org/people/mwohlf] created the discussion

"Re: Concept of different locales/time zones in jBPM5"

To view the discussion, visit: http://community.jboss.org/message/563675#563675

--------------------------------------------------------------
Hi Peter,
I agree with you that timezones should be considered from the beginning of jBPM5's development.

But I don't see your point about jBPM4, what i don't understand is this:
> [...]
> The problem is that the current implementation of jBPM neither store nor use UTC time and date internally: the engine always rely on the local time and date which can lead issues in an environment where your clients are in different locations (and time zones)
> [...] 
> The current implementation simply returns 'new Date()' which contains the local timestamp. If the UTC time was returned here that would mean that you store the date consistently from all locations but at the same time, you would also have to modify the code in a lot of places (date based queries in service interfaces; JobExecutor service scheduling etc) so I am a bit reluctant to say that all these parts should be rewritten.
Why do you think the engine uses local time internally?

This is from JavaDoc for java.util.Date:
> Although the Date class is intended to reflect   coordinated universal time (UTC), it may not do so exactly,   depending on the host environment of the Java Virtual Machine.   Nearly all modern operating systems assume that 1 day =  24 × 60 × 60 = 86400 seconds   in all cases. In UTC, however, about once every year or two there   is an extra second, called a "leap second." The leap   second is always added as the last second of the day, and always   on December 31 or June 30. For example, the last minute of the   year 1995 was 61 seconds long, thanks to an added leap second.   Most computer clocks are not accurate enough to be able to reflect   the leap-second distinction.
So my understanding so far was that jBPM4 uses UTC already internally (which may be off by some seconds on some platforms), but as far as I understand you don't agree on that?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/563675#563675]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100926/12a0c524/attachment-0001.html 


More information about the jboss-user mailing list