On Feb 25, 2005, at 1:44 AM, Thomas Tempelmann wrote:
This is a code snippet from my Joliet code, which is not Carbon,
though:
// get the GMT offset
MachineLocation loc;
ReadLocation (&loc); // careful: must not be called from interrupts
(or
from most File Mgr calls)!
long tmpGMTDelta;
Boolean tmpGMTknown;
if ((loc.latitude | loc.longitude) != 0) {
// sign-extend the 3 byte GMT value into a long:
tmpGMTDelta = loc.u.gmtDelta & 0x00FFFFFF;
if (tmpGMTDelta & 0x00800000) {
tmpGMTDelta |= 0xFF000000;
}
tmpGMTknown = true;
} else {
tmpGMTDelta = 0;
tmpGMTknown = false;
}
gmtDeltaSec = tmpGMTDelta;
gmtDeltaKnown = tmpGMTknown;
Maybe this works in Carbon, too.
Yeah. That works for getting the current GMT offset and I've been
trying to figure out how to twist it to tell me the GMT offset for an
arbitrary date.
But, it turns out that, after careful consideration, I need to change
the non-Mac code and not the mac code.
I've been staring at my monitor too long ... I can tell
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|