nsmcp::LogRecordParser method timestampSeconds (public)

 <instance of nsmcp::LogRecordParser[i]> timestampSeconds timestamp

Defined in /usr/local/ns/tcl/nsmcp/log-record.tcl

Parameters:
timestamp (required)

Testcases:
No testcase defined.
Source code:
if {![regexp {^([0-9]{2}/[A-Za-z]{3}/[0-9]{4}:[0-9]{2}:[0-9]{2}:[0-9]{2})(\.[0-9]+)?( [+-][0-9]{4})?$} $timestamp -> base fraction zone]} {return {}}
set format {%d/%b/%Y:%H:%M:%S}
if {$zone ne ""} {append base $zone; append format { %z}}
if {[catch {clock scan $base -format $format -locale C} seconds]} {return {}}
if {$fraction ne ""} {set seconds [expr {$seconds+double("0$fraction")}]}
return $seconds
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: