diff options
author | Dan Winship <danw@src.gnome.org> | 2002-09-05 03:13:14 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-09-05 03:13:14 +0800 |
commit | 4270c51a98b6cc77a8337c6120195be4f620c775 (patch) | |
tree | 25a6812737374a104df1ed6802c487402fe6d8a1 /e-util/e-time-utils.h | |
parent | b05255308c5033e6c719416253428b6e6856c3e6 (diff) | |
download | gsoc2013-evolution-4270c51a98b6cc77a8337c6120195be4f620c775.tar.gz gsoc2013-evolution-4270c51a98b6cc77a8337c6120195be4f620c775.tar.zst gsoc2013-evolution-4270c51a98b6cc77a8337c6120195be4f620c775.zip |
New. Like mktime(3), but assumes the input time is UTC.
* e-time-utils.c (e_mktime_utc): New. Like mktime(3), but assumes
the input time is UTC.
(e_localtime_with_offset): New. Like localtime_r(3), but also
returns an offset from UTC.
svn path=/trunk/; revision=17971
Diffstat (limited to 'e-util/e-time-utils.h')
-rw-r--r-- | e-util/e-time-utils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/e-util/e-time-utils.h b/e-util/e-time-utils.h index f6d85df5ac..0b081dadd4 100644 --- a/e-util/e-time-utils.h +++ b/e-util/e-time-utils.h @@ -48,6 +48,11 @@ void e_time_format_time (struct tm *date_tm, int buffer_size); +/* Like mktime(3), but assumes UTC instead of local timezone. */ +time_t e_mktime_utc (struct tm *timeptr); +/* Like localtime_r(3), but also returns an offset in minutes after UTC. + (Calling gmtime with tt + offset would generate the same tm) */ +void e_localtime_with_offset (time_t tt, struct tm *tm, int *offset); #endif /* E_TIME_UTILS */ |