git: 9front

Download patch

ref: cbb5cf55fcf24dd00ef505d7c9267e535fe1d87a
parent: 30af66e87cd2b47d9834ba95812c2952d01a5478
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Mar 3 21:45:15 EST 2026

/adm/timezone/README: describe how to generate tz files (thanks noodle)

--- a/adm/timezone/README
+++ b/adm/timezone/README
@@ -4,3 +4,53 @@
 
 Most of these files were provided by David Hogan.
 The Israel file was provided by Amos Shapir.
+Many other contributors have updated and fixed other timezones.
+See git for a full history.
+
+In order to convert a timezone from IANA tzdb files, fetch
+and build tzdb from:
+
+	https://data.iana.org/time-zones/releases/tzdb-2025b.tar.lz
+
+On unix, dump the DST transition dates:
+
+	zdump -c 1970,2038 -V $country | awk '/isdst=0/ { print $6, $3, $4, $5 }'
+
+Then, on 9front, run the following to convert the dates into a
+timezone file. This script will only generate the offset table,
+so the header will need to be added manually.
+
+	awk '
+	BEGIN {
+		
+		offset = ARGV[0]
+	}
+	{
+		if(NR % 6 != 1)
+			printf " "
+		c = "seconds '"$0" +0000'"
+		c | getline t
+		close(c)
+		t += offset
+		if(NR % 2 != 0)
+			t += 1
+		printf "%10d", t
+		if(NR % 6 == 0)
+			printf "\n"
+	}
+
+	END {
+		if(NR % 6 != 0)
+			printf "\n"
+	}
+	'
+
+The header takes the form:
+
+	STDABBREV offset DSTABBREV offset
+
+for example:
+
+	EST -18000 EDT -14400
+
+See ctime(2) for a full descriptioon of the format.
--