Script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…: Converts date and time for use in another time zoneIt defines a local time. A particular Automation Engine object type.
CONV_TIMESTAMP(Time Stamp, [TimeZone1], [TimeZone2])
Syntax |
Description/Format |
---|---|
Time stamp |
Time stamp from date and time ("YYYY-MM-DD HH:MM:SS"). |
TimeZone 1 |
Name of a TimeZone objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task or keyword UTC. Format: scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script. |
TimeZone 2 |
Name of a TimeZone object. Format: script literal or script variable |
Return code |
---|
Time stamp in the format ""YYYY-MM-DD HH:MM:SS" |
This script function converts date and time into the "YYYY-MM-DD HH:MM:SS" format for use in another time zone.
In doing so, TimeZone 1 may be used to enter the original time zone on which the calculation is based. If this parameter is left out, or if the keyword UTC is used, UTC (Coordinated Universal Time) is the valid basis for calculation. TimeZone 2 is used to name the time zone for which the time stamp is to be converted. If this optional parameter is not specified, the valid time zone is that of the object, or clientA closed environment within an Automation Engine system where you can create and run objects. A client name consists of a 4-digit number that must be indicated when a user logs on to the Automation Engine system. Users and their rights are also defined in clients. A particular Automation Engine object type. in case no time zone has been defined for that object.
If UTC is not used as the basis for calculation, time conversion is inaccurate when converting from summertime to wintertime. For example, if 02:30:00 means the first or second occurrence of this time of day cannot be recognized. AE always assumes the first appearance of a certain time during conversion to represent wintertime.
The following example shows time stamp conversion for the 2003/2004 turn of year. The conversion basis is a time zone defined for Sydney, Australia, which is converted to Central European Time. The result, "2003-12-31 14:00:00", is written to the activation protocol.
:SET &MEZ# = CONV_TIMESTAMP("2004-01-01 00:00:00","TZ.SYD","TZ.MEZ")
:PRINT &MEZ#
See also:
Script element | Description |
---|---|
Converts a date from one date format to another |
Script Elements - Date and Time
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered By Function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |