version 1.76, 2006/11/10 18:14:57
|
version 1.77, 2006/11/17 18:53:26
|
|
|
// Adding this to the POSIX 1970 microseconds epoch produces a 1 BCE epoch | // Adding this to the POSIX 1970 microseconds epoch produces a 1 BCE epoch |
// as used by this class. | // as used by this class. |
static const Uint64 POSIX_1970_EPOCH_OFFSET = | static const Uint64 POSIX_1970_EPOCH_OFFSET = |
PEGASUS_UINT64_LITERAL(62167201200000000); |
PEGASUS_UINT64_LITERAL(62167219200000000); |
| |
//============================================================================== | //============================================================================== |
// | // |
|
|
# elif defined(PEGASUS_OS_LINUX) || defined(PEGASUS_OS_VMS) | # elif defined(PEGASUS_OS_LINUX) || defined(PEGASUS_OS_VMS) |
tzMinutesEast = (int) tmval->tm_gmtoff/60; | tzMinutesEast = (int) tmval->tm_gmtoff/60; |
# else | # else |
if (tz.tz_dsttime > 0) |
|
tzMinutesEast = -tz.tz_minuteswest; | tzMinutesEast = -tz.tz_minuteswest; |
else |
if (tz.tz_dsttime > 0) |
|
{ |
// ATTN: It is unclear how to determine the DST offset. | // ATTN: It is unclear how to determine the DST offset. |
// Assume 1 hour. | // Assume 1 hour. |
tzMinutesEast = -tz.tz_minuteswest + 60; |
tzMinutesEast += 60; |
|
} |
# endif | # endif |
} | } |
| |
|
|
| |
CIMDateTimeRep* rep = new CIMDateTimeRep; | CIMDateTimeRep* rep = new CIMDateTimeRep; |
rep->usec = | rep->usec = |
POSIX_1970_EPOCH_OFFSET + Uint64(sec) * Uint64(1000000) + Uint64(usec); |
POSIX_1970_EPOCH_OFFSET + |
|
Uint64(sec + tzMinutesEast * 60) * Uint64(1000000) + |
|
Uint64(usec); |
rep->sign = tzMinutesEast < 0 ? '-' : '+'; | rep->sign = tzMinutesEast < 0 ? '-' : '+'; |
rep->utcOffset = tzMinutesEast < 0 ? -tzMinutesEast : tzMinutesEast; | rep->utcOffset = tzMinutesEast < 0 ? -tzMinutesEast : tzMinutesEast; |
rep->numWildcards = 0; | rep->numWildcards = 0; |