-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
David T. Lewis wrote:
Yes, your solution is correct, and I would prefer your implementation over the method quoted above for any version of Squeak.
On older versions of Squeak, the result might not have time zone offset that you expect, so check for that. But the magnitude will be correct in any case.
Perhaps there are reasons to use an implementation that is not defined, in terms of fromSeconds:
One of the reasons could be the time zone as you indicate.
Another may be the resolution (precision) of the time.
I guess that it makes more sense to define fromSeconds: in terms of fromMilliseconds: rather than the reverse which I'm doing here.
In any case, a Swazoo implementation could perhaps use different implementations in the case of Squeak 4.6 and in the case of Squeak 5/6.
It could use something like a check to see whether self respondsTo: localOffsetSeconds and if not use the implementation in terms of fromSeconds:
David Stes