Merge remote-tracking branch 'origin/topic/seth/strptime'

* origin/topic/seth/strptime:
  Added a BiF to wrap the strptime function.

Closes #904.
This commit is contained in:
Robin Sommer 2012-10-19 15:12:56 -07:00
commit 5716545cfa
7 changed files with 60 additions and 7 deletions

View file

@ -0,0 +1,2 @@
1350604800.0
0.0

View file

@ -0,0 +1,10 @@
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path reporter
#open 2012-10-19-06-06-36
#fields ts level message location
#types time enum string string
0.000000 Reporter::WARNING strptime conversion failed: fmt:%m d:1980-10-24 (empty)
#close 2012-10-19-06-06-36

View file

@ -0,0 +1,10 @@
#
# @TEST-EXEC: bro %INPUT
# @TEST-EXEC: btest-diff .stdout
# @TEST-EXEC: btest-diff reporter.log
event bro_init()
{
print strptime("%Y-%m-%d", "2012-10-19");
print strptime("%m", "1980-10-24");
}