CA Workload Automation ESP Edition

Expand all | Collapse all

UTC Timestamp

Jump to Best Answer
  • 1.  UTC Timestamp

    Posted 07-09-2019 05:38 PM
    Good evening!
    First post so please bear with me :) We are FTP-ing a file from the mainframe and the file name is required to contain a UTC timestamp.

    The FTP command will only accept ESP variables to construct the UTC timestamp, but so far we've only been able to obtain current date/time. Is there a simple way to use ESP variables to get a UTC value? example: file name now is "Outages_20190709173601" but should be "Outages_20190709213601"

    Thank you,
    Regina 



  • 2.  RE: UTC Timestamp

    Posted 07-11-2019 01:34 PM
    Hi Regina,

    You may try with GENTIME, like below in the related job definition:
    GENTIME LL REALNOW UTC

    Then use %LLYEAR%LLMM%LLDD%LLTIME for the date/time stamp on the file name.

    Hope it helps,

    Lucy


  • 3.  RE: UTC Timestamp

    Posted 07-11-2019 02:28 PM
    Please ignore my previous post.

    Actually it won't help. Adding UTC will treat the REALNOW local time as the UTC, and translate it to local time.

    Sorry about that.

    Lucy


  • 4.  RE: UTC Timestamp

    Posted 07-12-2019 09:36 AM
    Thanks so much, Lucy. So is there really no way to get a UTC date/time? This is what we use now: 

    'Outages_!CURYYMMDD!RTIME!ESPASS..json'




  • 5.  RE: UTC Timestamp
    Best Answer

    Posted 07-12-2019 04:57 PM
    Hi Regina,

    Sorry. Currently ESP will convert a time with timezone to local time, but it doesn't convert local time to time in a different timezone (like UTC).

    I can't think of a better way than below:
    GENTIME LL REALNOW PLUS 5 HOURS

    Then use %LLTIME. Note: you will need to add the IF logic, since if it's not daylight saving time, then it should be 4 hours instead of 5.

    Lucy