apply UTC offset during timestamp conversion
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 26 Apr 2019 07:47:30 +0000 (09:47 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 1 Aug 2024 12:55:33 +0000 (14:55 +0200)
commit43bf25e0bebe8a3413a6969b8639857834587ad7
tree3a2d4cf80cff19dc9189c6466d6adc011da5c0f8
parent310af20b08b9763186fb2e43234f73f9ac033d7e
apply UTC offset during timestamp conversion

Glibc strptime(3) does not automatically apply the UTC offset
when present but stores it in the member tm_gmtoff. (Probably
because the standard mandates different, insufficient means
of timezone handling that need to be supported for portability.)

Thus we do that right in the constructor immediately after we
have obtained a valid struct tm.
src/timefunc.cpp
test/test_timefunc.cpp