11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$ZUTIL(193)varying number of digits specifying fractional seconds. This format is similar to $HOROLOG,except that $HOROLOG does not preserve fractional seconds.The $ZUTIL(193) time value is a decimal numeric value that counts the time in seconds andfractions thereof. The number of digits in the fractional seconds may vary from zero to nine,depending on the precision of your computer's time-of-day clock. On Windows systems thefractional precision is three decimal digits; on UNIX systems it is six decimal digits.$ZUTIL(193) suppresses trailing zeroes or a trailing decimal point in this fractional portion.The $ZUTIL(193) date value must be within the range of January 1, 1970 ($HOROLOG =47117,00000) through January 18, 2038 ($HOROLOG = 71971,86399). This is an operatingsystem limitation, independent of the date range available through $HOROLOG. Specifyinga date outside this range causes an error.Note:Exercise caution when comparing local time and UTC time:• You cannot interconvert local time and UTC time by simply adding or subtractingthe value of $ZTIMEZONE * 60. This is because $HOROLOG local time isadjusted for local time variants (such as Daylight Savings Time, which seasonallyadjusts local time by one hour). These local time variants are not reflected in$ZTIMEZONE.• Both the timezone offset from GMT and local time variants (such as the seasonalshift to Daylight Savings Time) can affect the date as well as the time. Convertingfrom local time to UTC time (or vice versa) requires converting the date as wellas the time.Current Date and TimeThe various ways to return the current date and time are compared, as follows:• $ZTIMESTAMP contains the UTC (Greenwich Mean) date and time, with fractionalseconds, in <strong>Caché</strong> storage ($HOROLOG) format. Fractional seconds are expressed inthree digits of precision (on Windows systems), or six digits of precision (on UNIX systems).• $HOROLOG contains the local, variant-adjusted date and time in <strong>Caché</strong> storage format.It does not record fractional seconds. How $HOROLOG resolves fractional secondsdepends on the operating system platform: On Windows, it rounds up any fractionalsecond to the next whole second. On UNIX, it truncates the fractional portion.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 725

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!