[Glass] TimeZone

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Tue Jun 30 13:57:28 PDT 2015


On 06/29/2015 06:09 AM, Trussardi Dario Romano via Glass wrote:
>
>
> After update the TimeZone as upper, the problematic reported into my 
> email: Re: [Glass] Timespan Month  questions
>
> remain open.
>
>
It seems that the problem is that you are comparing the same local time 
from two different time zones:

{a} . -> 2015-04-30T23:59:59.99999898672104+02:00
(class)@ -> DateAndTime
(oop)@ -> 324717569
offset@ -> 7200
seconds@ -> 4,5212399999999899E+08

{b} . -> 2015-04-30T23:59:59.99999898672104+01:00
(class)@ -> DateAndTime
(oop)@ -> 324726017
offset@ -> 3600
seconds@ -> 4,5212759999999899E+08

Note that the local time in both cases is the exactly the same and that 
the offsets are different.

Consequently the seconds (UTC) are different and time {b} being from an 
earlier time zone has a greater UTC and therefore compares greater than {a}.

For consistency of record keeping, I think that you need to settle on a 
single TimeZone of record and use that for all timestamps.
That should then make the timestamp comparisons manageable.

Dale






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150630/2bc07b19/attachment.html>


More information about the Glass mailing list