Important: The information in this document is obsolete and should not be used for new development.
The Geographic Location Record
The geographic location and time-zone information of a Macintosh computer are stored in extended parameter RAM. TheMachineLocationdata type defines the format for the geographic location record.
TYPE MachineLocation = {geographic location record} RECORD latitude: Fract; {latitude} longitude: Fract; {longitude} CASE Integer OF 0: (dlsDelta: SignedByte); {daylight saving time} 1: (gmtDelta: LongInt); {Greenwich mean time} END;The
Field Description
latitude- The location's latitude, in fractions of a great circle. For example, Copenhagen, Denmark is at 55.43 degrees north latitude. When writing the latitude to extended parameter RAM with the
WriteLocationprocedure, you must convert this value to aFractdata type. (For example, aFractvalue of 1.0 equals 90 degrees; -1.0 equals -90 degrees; and -2.0 equals -180 degrees.) For an example that shows this conversion process, see Listing 4-8 on page 4-19. For more information on theFractdata type, see the chapter "Mathematical and Logical Utilities" in this book.longitude- The location's longitude, in fractions of a great circle. For example, Copenhagen, Denmark is at 12.34 degrees east longitude. When writing the longitude to extended parameter RAM with the
WriteLocationprocedure, you must convert this value to aFractdata type. (For example, aFractvalue of 1.0 equals 90 degrees; -1.0 equals -90 degrees; and -2.0 equals -180 degrees.) For an example that shows this conversion process, see Listing 4-8 on page 4-19. For more information on theFractdata type, see the chapter "Mathematical and Logical Utilities" in this book.dlsDelta- A signed byte value representing the hour offset for daylight saving time. This field is a 1-byte value contained in a long word. It should be preserved when writing
gmtDelta. See Listing 4-10 on page 4-21 for an example that writesgmtDeltawhile preservingdlsDelta.gmtDelta- The Greenwich mean time (GMT). For example, Copenhagen, Denmark is at 1 hour west of GMT. This field is a 3-byte value contained in a long word. In addition, the top byte of this field should be masked off when writing because it is reserved. See Listing 4-9 on page 4-20 and Listing 4-10 on page 4-21 for code examples that get and set
gmtDeltaproperly.ReadLocationandWriteLocationprocedures use the geographic location record to read and store the geographic location and time zone information in extended parameter RAM. If the geographic location record has never been set, all fields contain 0.