function
Library: Date and time functions (OMDATE)
Include: omdate.xin |
Returns: Returns the adjusted date/time in |
define string function ymdhms-adjust-time-zone value string ymdhms to-be value string new-zone
Argument definitions
YYYYMMDDhhmmss+ZHZM
format.+hhmm
format ymdhms-adjust-time-zone
takes a date/time and a time zone, returning the date/time adjusted to the
given time zone. The returned date/time is also in the YYYYMMDDhhmmss+ZHZM
format.
The following program takes a date and adjusts its time zone using ymdhms-adjust-time-zone
.
include "omdate.xin" process local string new-time set new-time to ymdhms-adjust-time-zone "19980416154929+0500" to-be "+0600" output "Adjusted time with new time zone offset = " || new-time || "%n"Running this example will yield the following output:
Adjusted time with new time zone offset = 19980416164929+0600
To use ymdhms-adjust-time-zone
, you must include the following code near the top of your program:
include "omdate.xin"