[Glass] Timespan Month questions

Trussardi Dario Romano via Glass glass at lists.gemtalksystems.com
Fri Jun 26 06:04:00 PDT 2015


Ciao,

	i have this code to collect aDateAndTime for a period:	( Duration days: 300)

> 	| cll |
> 	cll := OrderedCollection new.
> 	
> 	( Timespan starting: ( Date fromString: '04.06.2015' ) duration: ( Duration days: 300)) 
> 		
> 		every: ( Duration days:1 )  do:[ :aDateAndTime | 
> 					
> 					" this is for verify the data " 
> 					( aDateAndTime date =  (Date fromString: '04.30.2015') ) ifTrue:[ aDateAndTime halt]. 
> 
> 					cll add: ( Timespan starting: aDateAndTime duration: ( Duration days: 1)) ].




	Now i found this problematic relative to		Timespan	 every:   do:		iteration.


	The aDateAndTime generated by iteration don't respect the TimeZone setup	

	but   all   dateAndTime generated by iteration are setting with a DateAndTime offset   based of the starting point :

		( Timespan starting: ( Date fromString: '04.06.2015' ) duration: ( Duration days: 300))

 

	In this case:  ( Timespan starting:   ( Date fromString: '04.06.2015' ) duration: ( Duration days: 300))		all aDateAndTime offset is set to 7200

	In this case:   ( Timespan starting:  ( Date fromString: '03.01.2015' ) duration: ( Duration days: 300))   		all aDateAndTime offset is set to 3600



	I hope I was clear.


	Thanks for any considerations,

		Dario

	


		

		

		
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150626/601e31bd/attachment.html>


More information about the Glass mailing list