|
VMS Help DECdts, utc_boundtime, Example *Conan The Librarian |
The following example records the time of an event and constructs
a single timestamp, which includes the time of the event. Note
that the utc_getusertime routine is called so the time zone
information that is included in the timestamp references the
user's environment rather than the system's default time zone.
OpenVMS systems do not have a default time zone rule. You
select a time zone by defining sys$timezone_rule during the
sys$manager:net$configure.com procedure, or by explicitly
defining sys$timezone_rule.
utc_t before, after, evnt;
/*
* Get the time before the event...
*/
utc_getusertime(&before); /* Out: Before binary timestamp */
/*
* Get the time after the event...
*/
utc_getusertime(&after); /* Out: After binary timestamp */
/*
* Construct a single timestamp that describes the time of the
* event...
*/
utc_boundtime(&evnt, /* Out: Timestamp that bounds event */
&before, /* In: Before binary timestamp */
&after); /* In: After binary timestamp */
|
|