diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 03ea9929db053b33d34508d6a958cd5ec2ead9d2
parent 790d9fa1a436ba6e480918d912400e5f1420cde4
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 26 Mar 2023 22:52:31 +0200

fix(import): wrong time marks

Diffstat:
Msrc/diary.c | 4----
Msrc/import.c | 3++-
2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/diary.c b/src/diary.c @@ -17,10 +17,6 @@ void setup_cal_timeframe() { localtime_r(&raw_time, &today); curs_date = today; - today.tm_sec = 0; - today.tm_min = 0; - today.tm_hour = 0; - cal_start = today; cal_start.tm_year -= CONFIG.range; cal_start.tm_mon = 0; diff --git a/src/import.c b/src/import.c @@ -22,7 +22,8 @@ void ics_import(const char* ics_input, WINDOW* header, WINDOW* cal, WINDOW* asid int conf_ch = 0; char dstr[16]; - struct tm date = {}; + time_t current_time = time(NULL); + struct tm date = *localtime(&current_time); long search_pos = 0; char* vevent;