DateTime>>#asLocal is broken

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DateTime>>#asLocal is broken

Holger Freyther
Hi Paolo,

DateTime now/asLocal is broken right now on a 32 bit system. The Time
timezonBias: is fed with 3483216000, which does not fit...is_c_int_64().

Could you explain the intention of the timezoneBias?

holger

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: DateTime>>#asLocal is broken

Paolo Bonzini-2
On 05/19/2011 05:10 PM, Holger Hans Peter Freyther wrote:
> DateTime now/asLocal is broken right now on a 32 bit system. The Time
> timezonBias: is fed with 3483216000, which does not fit...is_c_int_64().

It is is_c_int_64 that is broken.  I cut-and-pasted is_c_int_32 but of
course a 64-bit integer can be also fit in 32, 40, 48, or 56 bits when
represented as a LargeInteger on 32-bit systems.

Thanks for the report!

> Could you explain the intention of the timezoneBias?

It gives the timezone offset of the current locale for that time.  So
for example if the time zone bias of UTC time 2011-06-17T00:00:00+00:00
is +02:00 in your locale, the equivalent local time will be
2011-06-17T02:00:00+02:00.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk