Storing events with current date/time using UTC ($ZTimeStamp) instead of $Horolog - Best practices discussion
Hi everyone!
I am helping a partner to develop a new application and one of the things we are facing is that this WEB application will be used on different time zones.
My first recommendation is that all timestamps should be drawn from $ZTimeStamp instead of $Horolog. That would allow the system to be draw the correct sequence of events even when they are generated on different timezones.
On the other hand, it is sometimes useful to know what was the local timezone at the moment the event was generated to compare to events generated on other systems or to correlate to people's recollection of facts (people deal with $Horolog concept of time).
So, to cope with these requirements, besides storing the date/time as a %TimeStamp drawn from $ZTimeStamp, I would also store the local timezone of the user that generated the event or maybe simply also store the date/time drawn from $Horolog together with the date/time drawn from $ZTimeStamp. Always store two timestamps, one for local date/time and another for UTC date/time looks like a nice solution.
I would like to know about other people's experience about this, pitfalls, tips, anything.
Kind regards,
Amir Samary