[egenix-users] Has the gmtoffset return value changed?
M.-A. Lemburg
mal at lemburg.com
Sun Oct 27 22:39:55 CET 2002
Mike C. Fletcher wrote:
> I have a little module "sunriseset.py" that calculates (strangely
> enough) sun rise and set times, and which was working fine with older
> versions of mxDateTime. However, this morning I received a bug report
> that it's no longer working. As far as I know there have been no
> changes to the module itself, and prior to this (when I checked it many
> months ago) its self-check passed fine. That would have been with an
> earlier mxDateTime release.
>
> I have, of course, since updated mxDateTime when I updated mxTextTools.
> The thing is, now the reported values from gmtoffset appear to have been
> reversed in sign (that is, what was 5h is now -5h).
-5h is the correct value in your locale (that's also what your
mail client reports as GMT offset):
The UTC offset is defined as: local time - UTC time,
e.g. it is negative in the US and positive in eastern
Europe and Asia.
> Obviously the sign
> is always just an arbitrary choice (hence the need to declare which
> direction increases/decreases in specifications of time systems), but
> I'm surprised that it would have changed sign between releases of the
> mxDateTime library.
>
> Anyway, I can work around this if I know which versions of mxDateTime
> return positive, and which negative, values for the same time-zones
> (i.e. when the switch occurs). Marc-André, anyone?
I am not aware that there were any changes in the sign. Are you
sure that mxDateTime returned 5h for you in some prior version ?
And if so, which versions are you comparing and on which
platform ?
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/
More information about the egenix-users
mailing list