Forum Discussion
Joe_D_Rozario_4
Nimbostratus
Mar 27, 2008date format conversion
I need some help with date-time conversion. Our servers are setting cookies with local time-stamp i.e., Thu, 09 Apr 2008 17:06:48 PDT (or PST). I am trying to find a way to convert this time-stamp to ...
hoolio
Cirrostratus
Apr 02, 2008Per the man page for clock (Click here), I don't think -format is a valid flag for clock scan. And -timezone doesn't seem to be valid for clock format. Can you give this a shot?
when RULE_INIT {
set ::date_str_orig {Thu, 09 Apr 2008 17:06:48 PDT}
set x [clock scan $::date_str_orig]
set y [clock format $::x -format {%a, %d %b %Y %T %Z} -gmt 1]
log local0. "\$::date_str_orig: $::date_str_orig, \$::x: $::x, \$::y: $::y"
}Log output:
Rule : $date_str_orig: Thu, 09 Apr 2008 17:06:48 PDT, $x: 1207786008, $y: Thu, 10 Apr 2008 00:06:48 GMTAaron
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