about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-04-29 11:50:44 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-04-29 11:50:44 +0200
commit70c37f3318a563a7d13104a0dfebddd14870244d (patch)
tree3867eb454c1bd8480a34ecaf87edb4e11046a30c
parentb11f60c3e9dd69d2a113611300defe1ac2bc7008 (diff)
downloadwcal-70c37f3318a563a7d13104a0dfebddd14870244d.tar.gz
wcal-70c37f3318a563a7d13104a0dfebddd14870244d.tar.xz
wcal-70c37f3318a563a7d13104a0dfebddd14870244d.zip
set TZ empty to ensure mktime uses UTC
-rw-r--r--wcal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wcal.c b/wcal.c
index 4a46b8f..21ced91 100644
--- a/wcal.c
+++ b/wcal.c
@@ -56,6 +56,8 @@ parse_isodate(char *optarg, struct tm *tm)
 int
 main(int argc, char *argv[])
 {
+	setenv("TZ", "", 1);
+
 	time_t now = time(0);
 	struct tm *tm = gmtime(&now);