mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge branch 'master' of git.bro.org:bro
This commit is contained in:
commit
2e12d01eee
3 changed files with 35 additions and 13 deletions
|
@ -576,7 +576,14 @@ const char* fmt_access_time(double t)
|
|||
{
|
||||
static char buf[256];
|
||||
time_t time = (time_t) t;
|
||||
strftime(buf, sizeof(buf), "%d/%m-%H:%M", localtime(&time));
|
||||
struct tm ts;
|
||||
|
||||
if ( ! localtime_r(&time, &ts) )
|
||||
{
|
||||
reporter->InternalError("unable to get time");
|
||||
}
|
||||
|
||||
strftime(buf, sizeof(buf), "%d/%m-%H:%M", &ts);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue