allow creating Time objects from formatted timestamps
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Tue, 30 Jan 2018 14:52:25 +0000 (15:52 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 27 Mar 2019 09:31:38 +0000 (10:31 +0100)
commit2795e39cc40483f3508a7d932f08ecac36e9d729
treecd203760ae653435ac3e28afa6c2b5f31f08b9f9
parent72acd54c52bf6dd5f1d2f9c18e29deea41480a94
allow creating Time objects from formatted timestamps

Read ISO-8601 formatted strings to construct timestamps from.

The format strings already defined for formatting timestamps are
reused. Since years can be negative but the sign handling in
glibc is flawed with the %Y specifier, we need to handle negative
year numbers manually.
src/timefunc.cpp
src/timefunc.hxx
test/test_timefunc.cpp