if ((machineLocation.u.gmtDelta & 0x00800000) != 0) { gmtOffsetSeconds = (machineLocation.u.gmtDelta & 0x00FFFFFF) | 0xFFFFFFFFFF000000LL; JSLL_UI2L(gmtDelta,0); } else { gmtOffsetSeconds = (machineLocation.u.gmtDelta & 0x00FFFFFFUL); JSLL_UI2L(gmtDelta,PRMJ_DAY_SECONDS); }   JSLL_SUB(gmtDelta,gmtDelta,gmtOffsetSeconds);   if (machineLocation.u.dlsDelta != 0) { JSLL_UI2L(dlsOffset, PRMJ_HOUR_SECONDS); } else { JSLL_I2L(dlsOffset, 0); }  JSLL_ADD(gmtDelta,gmtDelta, dlsOffset); JSLL_L2I(offset,gmtDelta);  zone = offset; return (time_t)offset;
if (machineLocation.u.dlsDelta != 0) gmtOffsetSeconds -= PRMJ_HOUR_SECONDS; return (zone = -gmtOffsetSeconds);
PRMJ_LocalGMTDifference(){#if defined(XP_UNIX) || defined(XP_PC) || defined(XP_BEOS)    struct tm ltime;    /* get the difference between this time zone and GMT */    memset((char *)&ltime,0,sizeof(ltime));    ltime.tm_mday = 2;    ltime.tm_year = 70;#ifdef SUNOS4    ltime.tm_zone = 0;    ltime.tm_gmtoff = 0;    return timelocal(&ltime) - (24 * 3600);#else    return mktime(&ltime) - (24L * 3600L);#endif#endif#if defined(XP_MAC)    static time_t    zone = -1L;    MachineLocation  machineLocation;    JSUint64	     gmtOffsetSeconds;    JSUint64	     gmtDelta;    JSUint64	     dlsOffset;    JSInt32	     offset;    /* difference has been set no need to recalculate */    if(zone != -1)	return zone;    /* Get the information about the local machine, including     * its GMT offset and its daylight savings time info.     * Convert each into wides that we can add to     * startupTimeMicroSeconds.     */    MyReadLocation(&machineLocation);    /* Mask off top eight bits of gmtDelta, sign extend lower three. */    if ((machineLocation.u.gmtDelta & 0x00800000) != 0) {	gmtOffsetSeconds = (machineLocation.u.gmtDelta & 0x00FFFFFF) | 0xFFFFFFFFFF000000LL;	JSLL_UI2L(gmtDelta,0);    } else {	gmtOffsetSeconds = (machineLocation.u.gmtDelta & 0x00FFFFFFUL);	JSLL_UI2L(gmtDelta,PRMJ_DAY_SECONDS);    }    /*     * Normalize time to be positive if you are behind GMT. gmtDelta will     * always be positive.     */    JSLL_SUB(gmtDelta,gmtDelta,gmtOffsetSeconds);    /* Is Daylight Savings On?  If so, we need to add an hour to the offset. */    if (machineLocation.u.dlsDelta != 0) {	JSLL_UI2L(dlsOffset, PRMJ_HOUR_SECONDS);    } else {	JSLL_I2L(dlsOffset, 0);    }    JSLL_ADD(gmtDelta,gmtDelta, dlsOffset);    JSLL_L2I(offset,gmtDelta);    zone = offset;    return (time_t)offset;#endif}