![]() |
WriteLocation |
||||
Header: | OSUtils.h | Carbon status: | Supported | |
Changes the geographic location or time-zone information stored in extended parameter RAM.
void WriteLocation ( const MachineLocation *loc );
The geographic location and time-zone information to write to the extended parameter RAM.
The latitude and longitude are stored in the geographic location structure as Fract values, giving accuracy to within 1 foot. For example, a Fract value of 1.0 equals 90 degrees; 1.0 equals 90 degrees; and 2.0 equals 180 degrees.
Use the functions Long2Fix and Fix2Fract to convert longitude and latitude values to the Fixed data type and then to the Fract data type for storage.
Use the daylight savings time value signed byte value to specify the offset for the hour fieldwhether to add one hour, subtract one hour, or make no change at all.
The Greenwich mean time value is in seconds east of GMT. For example, San Francisco is at 28,800 seconds (8 hours * 3,600 seconds per hour) east of GMT.The gmtDelta field is a 3-byte value contained in a long word. When writing gmtDelta, mask off the top byte because it is reserved. Preserve the value of dlsDelta.
The WriteLocation function was previously available with the Script Manager.
For more information on the geographic location record, see MachineLocation.
For more information on the Fract data type and the conversion routines Long2Fix, Fix2Fract, Fract2Fix, and Fix2Long, see Mathematical and Logical Utilities.
Do not call the WriteLocation function at interrupt time.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.