diary

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

commit da9cd9df5926d624c2790f5f712a02e46a63afc9
parent 20afd95306d3ccf4abdc1ec2a02f95ed700ed815
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sun,  3 Oct 2021 17:30:07 +0200

attempt to determine DST

Diffstat:
Msrc/caldav.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/caldav.c b/src/caldav.c @@ -753,7 +753,9 @@ int caldav_sync(struct tm* date, } struct tm* localfile_time = gmtime(&attr.st_mtime); fprintf(stderr, "Local dst: %i\n", localfile_time->tm_isdst); - //local_time->tm_isdst = -1; + // set to negative value, so mktime uses timezone information and system databases + // to attempt to determine whether DST is in effect at the specified time + localfile_time->tm_isdst = -1; time_t localfile_date = mktime(localfile_time); fprintf(stderr, "Local dst: %i\n", localfile_time->tm_isdst); fprintf(stderr, "Local file last modified time: %s\n", ctime(&localfile_date));