Skip to content

Commit

Permalink
Change TZDEFRULES from New_York to GMT and TZDEFRULESTRING fr…
Browse files Browse the repository at this point in the history
…om `,M3.2.0,M11.1.0` to `GMT0`.

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.
  • Loading branch information
michaellenaghan committed Dec 13, 2023
1 parent 8dbfb77 commit 5c0c422
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions libc/time/localtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion libc/time/tzfile.internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#endif /* !defined TZDEFAULT */

#ifndef TZDEFRULES
#define TZDEFRULES "New_York"
#define TZDEFRULES "GMT"
#endif /* !defined TZDEFRULES */


Expand Down

0 comments on commit 5c0c422

Please sign in to comment.