Forum Discussion
notKeith_109250
Nimbostratus
Nov 06, 2014Once I've set the current day, I need to manipulate it
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 serv...
R_Eastman_13667
Nov 07, 2014Historic F5 Account
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}"
- notKeith_109250Nov 19, 2014
Nimbostratus
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects