This gives me a current date value:
set current_day [clock format [clock seconds] -format {%j} ] set current_time [clock seconds]
The problem for me here is I need local time. The F5 server is on UTC, but the server is CST. How can I generate a variable that basically says current_day {all that stuff} - 6 hours? And likewise set current_time [clock seconds] - 6 hours? Is this possible?
Try this:
set currentTime [clock format [clock seconds] -format {%m%d%Y%H:%M:%S}]
set todaysDate [clock format [clocks seconds] -format {%Y-%m-%d}]
log local0. "Today's date is: ${todaysDate} and time is: ${currentTime}"
Hi, R Eastman - that doesn’t solve my problem - the F5 is UTC - the result of this code shows today’s date and time, still UTC. I’m looking for some conversion that in effect says here is the UTC time - (maybe in epoch time?) - now subtract 5 or 6 hours (depending) and use THAT value to populate todaysDate and currentTime.. still looking.