aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-02-05 09:15:01 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2016-02-05 19:06:54 +0100
commite9c8197e4ed1f516c41f803b9aa79bcfe7c7a7ab (patch)
tree80660f846491bfa750a4e425d9caf7ab2b571cc3 /src/utils.c
parent8bdf0c0b3b8870157f50554ea51d4751d0b7efa9 (diff)
downloadcalcurse-e9c8197e4ed1f516c41f803b9aa79bcfe7c7a7ab.tar.gz
calcurse-e9c8197e4ed1f516c41f803b9aa79bcfe7c7a7ab.zip
Refactor grep mode
Split io_save_{apts,todo}() into functions that write raw data to a file and functions that write formatted items to stdout such that one can easily extend the grep mode for format string support in a follow-up commit. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index b1ef630..a5e1196 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -485,6 +485,7 @@ long update_time_in_date(long date, unsigned hr, unsigned mn)
localtime_r(&t, &lt);
lt.tm_hour = hr;
lt.tm_min = mn;
+ lt.tm_sec = 0;
new_date = mktime(&lt);
EXIT_IF(new_date == -1, _("error in mktime"));