[Zope] - Some DateTime behaviors I just don't understand
skip@calendar.com (Skip Montanaro)
skip@calendar.com (Skip Montanaro)
Thu, 7 Jan 1999 10:39:57 -0500 (EST)
Jim> The problem is that DateTime wants to support offsets in seconds
Jim> from the epoc *and* offsets in days from 1901-01-01. This approach
Jim> is flawed. (It results from some interface baggage from some older
Jim> date-time implementations of mine.)
Jim> I'm inclined to change DateTime to only expect epoch offsets in
Jim> seconds when a single numeric argument is given. This will be
Jim> changed in the next release.
Since time.time() returns a float and the number of days since 1901-01-01
would normally be considered an int, why not interpret single floating point
args as seconds since the Unix epoch and ints or longs as days since
1901-01-01? This would be easily enough explained in the documentation and
would perhaps induce less breakage in existing applications that use
DateTime.
Skip