[Glass] Timing testing. But is it correct ?

Johan Brichau johan at yesplan.be
Tue Apr 2 08:53:14 PDT 2019


Check the ‘end’ of both the ‘month’ and the ’timespan’.
They are probably in other timezone offsets, because of the switch of daylight saving time on 31/03/2019.

This is often very annoying… that day does not have 24 hours but 23...

So, the ‘duration’ of a day is different, depending on which day it is. 
I’m afraid many Timing-related classes have not been designed with DST changes in mind and you just need to work with these issues and see how you can deal with them.

For example, create the timespan as follows and it will work: 

	( Timespan starting: ( DateAndTime year: 2019 month: 3 day: 31)  ending: ( DateAndTime year: 2019 month: 4 day: 1))

We have had to deal with many such issues in our codebase. 
Fortunately, EU has decided to abolish it in 2021… but that does not mean the rest of the world is going to :)

Hope this helps..

Johan

> On 2 Apr 2019, at 16:39, Trussardi Dario Romano via Glass <glass at lists.gemtalksystems.com> wrote:
> 
> I have this code into Gemstone  3.1.0.6  workspace:
> 
> 	| month  timespan |
> 	month := Month month: 3 year: 2019.
> 
> 	timespan := ( Timespan starting: ( DateAndTime year: 2019 month: 3 day: 31)  duration: ( Duration days: 1)).
> 
> 	^ month includes: timespan 
> 
> 	It answer false.
> 
> 	But is it correct ?
> 
> 	Thanks for every consideration.
> 
> 		Dario
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20190402/4a9b66ec/attachment.html>


More information about the Glass mailing list