Date today is wrong!?

Baveco, Dr. J.M. J.M.Baveco at Alterra.wag-ur.nl
Tue May 16 20:20:29 UTC 2000


Well, don't forget to fix Time dateAndTimeFromSeconds: secondCount as well
with the same temp fix (at least for values referring to later than 29 Feb).
Otherwise you won't be able to edit your swiki-pages anymore (since the
comswiki code compares page-save time and page-creation time based on these
two methods). The next windows VM is expected to incorporate a real fix (is
it?),

cheers,
Hans

> -----Oorspronkelijk bericht-----
> Van:	John Clonts [SMTP:jclonts at mastnet.net]
> Verzonden:	dinsdag 16 mei 2000 20:24
> Aan:	squeak at cs.uiuc.edu
> Onderwerp:	Re: Date today is wrong!?
> 
> Gerardo Richarte wrote:
> > 
> > Hi! Leandro found this:
> > 
> >     Today is '16 May 2000', but my Squeak is answering '15 May 2000'...
> > 
> >     On my squeak (On Windows NT)
> > 
> >     Time primSecondsClock = 3135851829 "that is smaller than"
> >     (Date newDay: 16 month: 5 year: 2000) asSeconds = 3135888000.
> > 
> >     It looks like something is wrong with the primitive... or windows?
> > or
> > conversion from seconds to days... I'm not sure...
> 
> Yes indeed, its a bug in the Windows code.  The fix for the time being
> is
> 
> Time class>>dateAndTimeNow
> 	"Answer a two-element Array of (Date today, Time now)."
> 
> 	| secondCount d t |
> 	secondCount _ self primSecondsClock + 86400. " jcc patch for
> primsecondsclock bug 2/29/2000"
> 	d _ Date fromSeconds: secondCount.
> 	t _ Time fromSeconds: secondCount \\ 86400.
> 	^ Array with: d with: t
> 
> Cheers,
> John
> 
> -- 
> 
> [:o|] Buster BlockBlaster





More information about the Squeak-dev mailing list