diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-21 02:00:54 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-21 02:00:54 +0800 |
commit | 26e5915000652f4807e337a2b370ce0051972f04 (patch) | |
tree | e439a67248bf8c320c79774d6247fb5a3c37a05b /calendar/timeutil.c | |
parent | efc1cef1db090cbce9b25260d7f236a21fc7e129 (diff) | |
download | gsoc2013-evolution-26e5915000652f4807e337a2b370ce0051972f04.tar.gz gsoc2013-evolution-26e5915000652f4807e337a2b370ce0051972f04.tar.zst gsoc2013-evolution-26e5915000652f4807e337a2b370ce0051972f04.zip |
A lot of usability changes to GnomeCal -miguel
svn path=/trunk/; revision=168
Diffstat (limited to 'calendar/timeutil.c')
-rw-r--r-- | calendar/timeutil.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/calendar/timeutil.c b/calendar/timeutil.c index 09123b3202..df72390bc8 100644 --- a/calendar/timeutil.c +++ b/calendar/timeutil.c @@ -104,6 +104,21 @@ time_add_day (time_t time, int days) } time_t +time_add_minutes (time_t time, int minutes) +{ + struct tm *tm = localtime (&time); + time_t new_time; + + tm->tm_min += minutes; + if ((new_time = mktime (tm)) == -1){ + g_warning ("mktime could not handling adding a day with\n"); + print_time_t (time); + return time; + } + return new_time; +} + +time_t time_add_year (time_t time, int years) { struct tm *tm = localtime (&time); |