11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Caché</strong> <strong>ObjectScript</strong> Special Variables$HOROLOGContains the current date and time as integer counters.$HOROLOG$HDescription$HOROLOG contains a character string that consists of two integer values, separated by acomma. These two integers represent the current date and time. These integers are counters,not user-readable dates and times. $HOROLOG returns the current date and time in thefollowing format:date,timeThe first integer is the number of days since December 31, 1840, where day 1 is January 1,1841. Because <strong>Caché</strong> represents dates using a counter from an arbitrary starting point, <strong>Caché</strong>is unaffected by the Year 2000 boundary. The maximum value for this date integer is 2980013,which corresponds to December 31, 9999.The second integer is the number of seconds since midnight of the current day. The systemincrements the time field from 0 to 86399 seconds. When it reaches 86399 at midnight, thesystem resets the time field to 0 and increments the date field by 1.Setting $ZTIMEZONE affects the value of $HOROLOG for the current process. It changesthe time portion of $HOROLOG, and this change of time can also change the date portionof $HOROLOG.The various ways to return the current date and time are compared, as follows:• $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.• $ZUTIL(188) returns the local, variant-adjusted date and time, with fractional seconds,in <strong>Caché</strong> storage ($HOROLOG) format. Fractional seconds are expressed in six digitsof precision.• $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).432 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!