diff options
author | Luca Deri <deri@ntop.org> | 2019-09-10 22:15:23 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-09-10 22:15:23 +0200 |
commit | 0f9107bef348f853c01668048d386f9445fe851a (patch) | |
tree | 8176c46767500bc859a2454904518274867e2190 /example/ndpiReader.c | |
parent | 068611e8ba9317fecf40bd3e6e2a1b578944d3ea (diff) |
Fixed timezone conversion
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 117537f83..2dde10182 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1110,8 +1110,9 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa if(flow->ssh_tls.notBefore && flow->ssh_tls.notAfter) { char notBefore[32], notAfter[32]; - struct tm *before = gmtime(&flow->ssh_tls.notBefore); - struct tm *after = gmtime(&flow->ssh_tls.notAfter); + struct tm a, b; + struct tm *before = gmtime_r(&flow->ssh_tls.notBefore, &a); + struct tm *after = gmtime_r(&flow->ssh_tls.notAfter, &b); strftime(notBefore, sizeof(notBefore), "%F %T", before); strftime(notAfter, sizeof(notAfter), "%F %T", after); |