aboutsummaryrefslogtreecommitdiffstats
path: root/common/gettime.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-04-10 10:24:43 +0000
committerWerner Koch <[email protected]>2015-04-10 11:09:39 +0000
commit5d60c7f7e05a06e46e23bafe61cef09ad32aa998 (patch)
tree48731b9d026a9906e543891362aaa101472613e4 /common/gettime.h
parentcommon: Add new function isodate_human_to_tm (diff)
downloadgnupg-5d60c7f7e05a06e46e23bafe61cef09ad32aa998.tar.gz
gnupg-5d60c7f7e05a06e46e23bafe61cef09ad32aa998.zip
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 <[email protected]>
Diffstat (limited to 'common/gettime.h')
-rw-r--r--common/gettime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/gettime.h b/common/gettime.h
index 25886d26a..ec68faaed 100644
--- a/common/gettime.h
+++ b/common/gettime.h
@@ -29,6 +29,7 @@
typedef char gnupg_isotime_t[16];
time_t gnupg_get_time (void);
+struct tm *gnupg_gmtime (const time_t *timep, struct tm *result);
void gnupg_get_isotime (gnupg_isotime_t timebuf);
void gnupg_set_time (time_t newtime, int freeze);
int gnupg_faked_time_p (void);