mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
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:
commit
5716545cfa
7 changed files with 60 additions and 7 deletions
2
testing/btest/Baseline/bifs.strptime/.stdout
Normal file
2
testing/btest/Baseline/bifs.strptime/.stdout
Normal file
|
@ -0,0 +1,2 @@
|
|||
1350604800.0
|
||||
0.0
|
10
testing/btest/Baseline/bifs.strptime/reporter.log
Normal file
10
testing/btest/Baseline/bifs.strptime/reporter.log
Normal 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
|
10
testing/btest/bifs/strptime.bro
Normal file
10
testing/btest/bifs/strptime.bro
Normal 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");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue