viscal

cairo/gtk vi-like timeblocking calendar
git clone git://jb55.com/viscal
Log | Files | Refs | README | LICENSE

commit d65445ce6c2d6ea3742bdb48b569699486eb0bbd
parent 7f19f1a7c7c53033ca5d733a4abdd2457164b42a
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 13 Oct 2018 14:38:13 -0700

anything rendering related should probably be localtime...

Diffstat:
Mviscal.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/viscal.c b/viscal.c @@ -174,7 +174,7 @@ calendar_create(struct cal *cal) { struct tm nowtm; now = time(NULL); - nowtm = *gmtime(&now); + nowtm = *localtime(&now); nowtm.tm_min = 0; nowh = mktime(&nowtm); nowtm.tm_hour = 0; @@ -666,7 +666,7 @@ static icalcomponent *calendar_def_cal(struct cal *cal) { static time_t closest_timeblock_for_timet(time_t st, int timeblock_size) { struct tm lt; - lt = *gmtime(&st); + lt = *localtime(&st); lt.tm_min = round(lt.tm_min / timeblock_size) * timeblock_size; lt.tm_sec = 0; // removes jitter return mktime(&lt);