[Pharo-project] What can be negative regarding timezones with date-related objects?
Sven Van Caekenberghe
sven at beta9.be
Sat Jun 9 06:44:18 EDT 2012
In normal use, offsets can be negative, yes.
But in theory, the JDN could be negative as wel, before -4700 ;-)
The seconds/nanoseconds are always positive when normalized.
That is how I understand it.
PS: nanoseconds and even seconds in the offset are a joke, there are no such timezones.
On 09 Jun 2012, at 12:28, Mariano Martinez Peck wrote:
> Hi guys. Imagine in Fuel I am serializing date/time-related objects sending these messages:
> aDate julianDayNumber.
> aDateAndTime julianDayNumber.
> aDateAndTime nanoSecond.
> aDateAndTime secondsSinceMidnight.
> aDateAndTime offset asSeconds.
> aDateAndTime offset nanoSeconds.
> aDuration asSeconds.
> aDuration nanoSeconds.
> aTime asSeconds.
> aTime nanoeSecond.
> which of those things could answer negative numbers? because once I remember in my image everything was positive, but in other timezone I think "offset asSeconds" and "offset nanoSeconds" were negative in DateAndTime.
More information about the Pharo-dev