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.

System and Other Functions$ZUTIL(193)Converts Coordinated Universal Time (UTC) to local date and time (and vice versa).$ZUTIL(193,timestamp,direction)$ZU(193,timestamp,direction)ParameterstimestampdirectionA date and time to be converted. Specify timestamp in $ZTIMESTAMP format.If direction is omitted or 0, specify a Coordinated Universal Time (UTC) dateand time value. If direction is 1, specify a local date and time value.Optional — A boolean values specifying the direction in which to converttimestamp. If 0, timestamp is interpreted as a UTC value and converted tolocal time. If 1, timestamp is interpreted as a local date/time value and isconverted to UTC.The default is 0.Description$ZUTIL(193) inter-converts Coordinated Universal Time and local time:• It takes a date and time value in a Coordinated Universal Time and converts it to localtime (direction = 0).• It takes a date and time value in local time and converts it to Coordinated Universal Time(direction = 1).$ZUTIL(193) performs conversions using the current value of the $ZTIMEZONE specialvariable. $ZUTIL(193) adjusts for local time variants, such as Daylight Savings Time.The current date and time, in Coordinated Universal Time, with fractional seconds is containedin $ZTIMESTAMP. Coordinated Universal Time (UTC) is independent of time zone. (UTCis another name for Greenwich Mean Time (GMT).) Consequently, $ZTIMESTAMP providesa timestamp which is uniform across time zones. This may differ from both the local timevalue (because of time zone and local time variants) and the local date value (because of theinternational date line).$ZUTIL(193) and $ZTIMESTAMP both represent 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 a724 <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!