common: Add new function gnupg_gmtime.
authorWerner Koch <wk@gnupg.org>
Fri, 10 Apr 2015 10:24:43 +0000 (12:24 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 10 Apr 2015 11:09:39 +0000 (13:09 +0200)
commit5d60c7f7e05a06e46e23bafe61cef09ad32aa998
tree48731b9d026a9906e543891362aaa101472613e4
parentf6670100b7a15b2071c2e4062f5c5a678f2a30f6
common: Add new function gnupg_gmtime.

* common/gettime.c (gnupg_gmtime): New.
(gnupg_get_isotime): Use it.  Also take care of an gmtime_t returning
an error.
--

The fix in gnupg_get_isotime is only to cover up a theoretical broken
time (e.g. a value of (time_t)(-2) which is not mapped beyond 2038 on
32 bit systems).

Signed-off-by: Werner Koch <wk@gnupg.org>
common/gettime.c
common/gettime.h