|
Contents: | Main | Section | See Also: | User Manual | Advanced User Manual |
The $$UTC^DIUTC API returns the Greenwich Mean Time (GMT) represented in standard VA FileMan internal date/time format with an internal three-digit time zone offset appended to the end. The calculation for the internal offset is:
For example:
-07:00 = -420 minutes, divided by 5 = -84, and added to 500 = 416
There may be other output variables based on the value of the extended_output_flag input parameter. The details for the other output values are documented in the “Output” section.
To determine the offset, the API needs to have the timezone and country input parameters. These values are determined using the following algorithm:
The following errors are returned based on the evaluation of the input parameters:
$$UTC^DIUTC(fm_datetime[,timezone][,institution][,country][,extended_output_flag])
fm_datetime: |
(Required) Standard internal or external VA FileMan DateTime (e.g., NOW, T@12A). The Time portion of the input is required. NOTE: The NOW input parameter is based on the current system time. If NOW is passed in with a timezone and country input parameter that is different than the system’s time zone and country, inconsistent output may occur. |
timezone: |
(Optional) Can be either of the following:
|
institution: | (Optional) Pointer to the INSTITUTION (#4) file. |
country: |
(Optional) Can be either of the following:
|
extended_output_flag: |
(Optional) This parameter is an indicator of whether to do either of the following:
|
The function can have two different outputs depending on the value of the extended_input_flag input parameter. If the extended_output_flag is set to:
The default output DUZ(2) variable is used, as shown below:
>W $$UTC^DIUTC(3160816.120016) 3160816.160016452 |
The extended output DUZ(2) variable is used, as shown below:
>W $$UTC^DIUTC("T+1@11",,,,1) 3160811.150000452^AUG 11, 2016@15:00:00 (UTC-04:00)^-04:00^EASTERN^UNITED STATES^EDT^DAYLIGHT SAVINGS^SOFTWARE SERVICE |
The time zone and country are passed in, as shown below:
>W $$UTC^DIUTC("NOW","EASTERN",,"UNITED STATES",1) 3160815.133449452^AUG 15, 2016@13:34:49 (UTC-04:00)^-04:00^EASTERN^UNITED STATES ^EDT^DAYLIGHT SAVINGS^ |
The time zone and country are passed in and extended output, as shown below:
>W $$UTC^DIUTC("2/1/16@1500","CENTRAL",,"UNITED STATES",1) 3160201.210000428^FEB 01, 2016@21:00:00 (UTC-06:00)^-06:00^CENTRAL^UNITED STATES ^CST^STANDARD^ |
The institution is passed in and extended output, as shown below:
>W $$UTC^DIUTC("Jan 15, 2016@11",,1,,1) 3160115.160000440^JAN 15, 2016@16:00:00 (UTC-05:00)^-05:00^EASTERN^UNITED STATES ^EST^STANDARD^SOFTWARE SERVICE |
The following table lists the possible error messages returned with the $$UTC^DIUTC API:
Description |
---|
Date/Time parameter is missing. |
Institution parameter cannot include Country or Timezone parameter. |
Timezone parameter must include Country parameter. |
Country parameter must include Timezone parameter. |
Extended parameter must be NULL or a 1 for extended output. |
Cannot determine Country and Timezone from the Institution. |
Cannot determine User location. |
Cannot determine Country and Timezone from User location. |
Invalid Timezone. |
Invalid Country. |
Mismatch of Country and Timezone. |
NOTE: All of the error messages returned from the $$UTC^DIUTC API are preceeded by a: -1^. For example, “-1^Invalid Country”.
VA (Internet) / VA (Intranet) / OIT / EPMO / Site Map / Terms of Use / VA Privacy Policy / Accessibility Reviewed/Updated: January 22, 2018 If you have questions, need more information, or are having accessibility problems with this Web site, please contact us by E-Mail: Webmasters
|