From 5c0c4224775116c5d9dc35cc73e57c4d61da1409 Mon Sep 17 00:00:00 2001 From: Michael Lenaghan Date: Tue, 25 Jul 2023 19:10:03 -0400 Subject: [PATCH] Change `TZDEFRULES` from `New_York` to `GMT` and `TZDEFRULESTRING` from `,M3.2.0,M11.1.0` to `GMT0`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a companion to changing the default TZ value from GST to GMT. The rationale is the same: it’s a less surprising "not defined" default. --- libc/time/localtime.c | 5 ++--- libc/time/tzfile.internal.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libc/time/localtime.c b/libc/time/localtime.c index 604309c53..b61f93597 100644 --- a/libc/time/localtime.c +++ b/libc/time/localtime.c @@ -110,11 +110,10 @@ static const char gmt[] = "GMT"; /* ** The DST rules to use if TZ has no rules and we can't load TZDEFRULES. ** Default to US rules as of 2017-05-07. -** POSIX does not specify the default DST rules; -** for historical reasons, US rules are a common default. +** Default to GMT rules as of 2023-07-25. */ #ifndef TZDEFRULESTRING -#define TZDEFRULESTRING ",M3.2.0,M11.1.0" +#define TZDEFRULESTRING "GMT0" #endif struct ttinfo { /* time type information */ diff --git a/libc/time/tzfile.internal.h b/libc/time/tzfile.internal.h index 3c892b77f..5934778bf 100644 --- a/libc/time/tzfile.internal.h +++ b/libc/time/tzfile.internal.h @@ -29,7 +29,7 @@ #endif /* !defined TZDEFAULT */ #ifndef TZDEFRULES -#define TZDEFRULES "New_York" +#define TZDEFRULES "GMT" #endif /* !defined TZDEFRULES */