From 58a41d2ff276f917e8aaa94ca94751bb326e9bb0 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Wed, 27 Aug 2014 09:53:51 +0200 Subject: [PATCH] sys/cbor: set isdst to undefined after strptime CBOR does not specify the daylight saving time adjustment. --- sys/cbor/cbor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cbor/cbor.c b/sys/cbor/cbor.c index 1753dc3411..c370713e6a 100644 --- a/sys/cbor/cbor.c +++ b/sys/cbor/cbor.c @@ -694,6 +694,8 @@ size_t cbor_deserialize_date_time(const cbor_stream_t *stream, size_t offset, st return 0; } + val->tm_isdst = -1; /* not set by strptime(), undefined in CBOR */ + if (mktime(val) == -1) { return 0; }