Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 4 - Date, Time, and Measurement Utilities / Date, Time, and Measurement Utilities Reference
Data Structures


Long Date-Time Value and Long Date-Time Conversion Record

The long date-time value specifies the date and time as seconds relative to midnight, January 1, 1904. But where the standard date-time value is an unsigned, 32-bit long integer, the long date-time value is a signed, 64-bit integer in SANE comp format. This format lets you use dates and times with a much longer span--roughly 500 billion years. You can use this value to represent dates and times prior to midnight, January 1, 1904. The LongDateTime data type defines the long date-time value.

TYPE LongDateTime = comp;
When storing a long date-time value in files, you can use a 5-byte or 6-byte format for a range of roughly 35,000 years. You should sign extend this value to restore it to a comp format.

The Date, Time, and Measurement Utilities provide the LongDateCvt record to help in setting up LongDateTime values.

TYPE LongDateCvt =
RECORD
   CASE Integer OF
   0:
      (c:      comp);      {number of seconds relative to }
                           { midnight, January 1, 1904}
   1:
      (lHigh:  LongInt;    {high long integer}
       lLow:   LongInt);   {low long integer}
END;
Field Description
c
The date and time, specified in seconds relative to midnight, January 1, 1904, as a signed, 64-bit integer in SANE comp format. The high-order bit of this field represents the sign of the 64-bit integer. Negative values allow you to indicate dates and times prior to midnight, January 1, 1904.
lHigh
The high-order 32 bits when converting from a standard date-time value. Set this field to 0.
lLow
The low-order 32 bits when converting from a standard date-time value. Set this field to the standard date-time value representing the total number of seconds since midnight, January 1, 1904.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice