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.

$ZTIMESTAMP$ZTIMESTAMP represents date and time as a string with the format:ddddd,ttttt.fffWhere ddddd is an integer specifying the number of days since December 31, 1840; ttttt isan integer specifying the number of seconds since midnight of the current day, and fff is avarying number of digits specifying fractional seconds. This format is similar to $HOROLOG,except that $HOROLOG does not contain fractional seconds.Suppose the current date and time (UTC) is as follows:2004-07-23 15:17:27.984At that time, $ZTIMESTAMP has the value:59739,55047.984$ZTIMESTAMP reports the Coordinated Universal Time (UTC), which is independent oftime zone. (UTC is another name for Greenwich Mean Time (GMT).) Consequently,$ZTIMESTAMP provides a timestamp which is uniform across time zones. This may differfrom both the local time value and the local date value.The $ZTIMESTAMP time value is a decimal numeric value that counts the time in secondsand fractions thereof. The number of digits in the fractional seconds may vary from zero tonine, depending on the precision of your computer's time-of-day clock. On Windows systemsthe fractional precision is three decimal digits; on UNIX systems it is six decimal digits.$ZTIMESTAMP suppresses trailing zeroes or a trailing decimal point in this fractionalportion.The 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.• $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.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 489

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

Saved successfully!

Ooh no, something went wrong!