[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Appendix B: API Reference

nobody@nowhere.com nobody@nowhere.com
Tue, 20 Aug 2002 00:15:44 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixB.stx#2-37


    DateTime objects may be converted to integer, long, or float
    numbers of days since January 1, 1901, using the standard int, 
    long, and float functions (Compatibility Note: int, long and
    float return the number of days since 1901 in GMT rather than
    local machine timezone). DateTime objects also provide access
    to their value in a float format usable with the python time
    module, provided that the value of the object falls in the
    range of the epoch-based time module.

      % Anonymous User - June 10, 2002 10:51 am:
       It actually seems to return the time in seconds since 1/1/1970, not 1/1/1901.

      % Anonymous User - July 24, 2002 2:32 pm:
       I'm guessing that's a typo -- python has always run time from 1970

      % Anonymous User - Aug. 20, 2002 12:15 am:

       [UNIX: prob. from astronomical timekeeping] n. The time and date corresponding to 0 in an operating system's
       clock and timestamp values. Under most UNIX versions the epoch is 00:00:00 GMT, January 1, 1970; under VMS,
       it's 00:00:00 of November 17, 1858 (base date of the U.S. Naval Observatory's ephemerides); on a Macintosh,
       it's the midnight beginning January 1 1904. System time is measured in seconds or ticks past the epoch. Weird
       problems may ensue when the clock wraps around (see wrap around), which is not necessarily a rare event; on
       systems counting 10 ticks per second, a signed 32-bit count of ticks is good only for 6.8 years. The
       1-tick-per-second clock of UNIX is good only until January 18, 2038, assuming at least some software
       continues to consider it signed and that word lengths don't increase by then.