Is there anything prebuilt for converting to epoch time or a recommended approach within Automic?
Release : 12.3
Component :
There is no built-in epoch time in Automic. There is a code snippet from one of our customers that was posted on our community that might work: https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=786411#bm8981c29f-936e-4f04-bce0-747c8276ca2a - the entry from May 3, 2016 has a good script to do this:
:set &sdate#=SYS_DATE("YYYY-MM-DD", 'TZ.GMT.E')
:set &stime#=SYS_TIME("HH:MM:SS", 'TZ.GMT.E')
:set &daysbetween#=diff_date("YYYY-MM-DD;1970-01-01", "YYYY-MM-DD;&sdate#")
!:print &daysbetween# days between today and 01/01/1970
:set &daysec#=mult(&daysbetween#,86400)
!:print Which equals &daysec# seconds
:set §oday#=diff_time("HH:MM:SS;&stime#","000000","SS")
!:print Seconds today is §oday#
:set &CURRENT_EPOCH_TIME#=add(&daysec#,§oday#)
:print Epoch is &CURRENT_EPOCH_TIME#