Skip to content

Commit 4bfd37d

Browse files
committed
1.0.83 - pods
1 parent 821f606 commit 4bfd37d

10 files changed

Lines changed: 1449 additions & 542 deletions

File tree

extras/adm/buildtz.fan

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ using build
2424
**
2525
** Refer to TimeZone.java for the time zone binary database format.
2626
**
27+
** How to use this script:
28+
**
29+
** 1. Clone the [tzdb]`https://github.com/fantom-lang/tzdb` repo from GitHub
30+
** See the README in that repo for details on where to clone it.
31+
** 1. Update the 'tzVer' variable in the script below for the tzdb you want to gen
32+
** 1. Run this script to generate the Fantom JVM tz database
33+
** 1. Then run 'fan compilerEs::TzTool -embed -gen' to generate the tz database for JS
34+
**
2735
** Conversion Notes Nov-2010
2836
** -------------------------
2937
** - southamerica was non-ASCII, resaved as UTF-8
@@ -53,15 +61,35 @@ using build
5361
** - Asia/Hebron - overlapping rules, nuked many of 2010
5462
** - Asia/Gaza - overlapping rules, couple in 2010-2013
5563
**
64+
** Conversion Notes Dec-2025
65+
** -------------------------
66+
** - 2025c version
67+
** - Africa/Casabalanca has overlapping rules - nuked many of them
68+
** - Africa/Egypt - fixed overlapping rules
69+
** - Asia/Palestine - fixed overlapping rules
70+
**
5671
class Build : BuildScript
5772
{
5873

5974
//////////////////////////////////////////////////////////////////////////
6075
// Inputs
6176
//////////////////////////////////////////////////////////////////////////
6277

63-
// directory of input files
64-
Uri srcDir := `/work/stuff/tzinfo/2019c/`
78+
** Timezone database version to build for
79+
private static const Str tzVer := "2025c"
80+
81+
** Directory of input files
82+
once Uri srcDir()
83+
{
84+
// assume unix/mac
85+
Uri? homeDir := Env.cur.vars["HOME"]?.toUri
86+
87+
// check for window
88+
if (Env.cur.os == "win32")
89+
homeDir = Env.cur.vars["HOMEPATH"].replace("\\", "/").plus("/").toUri
90+
91+
return homeDir.plus(`tzdb/${tzVer}/`)
92+
}
6593

6694
// input files from Olsen database
6795
Uri[] srcUris :=
@@ -74,7 +102,6 @@ class Build : BuildScript
74102
`northamerica`,
75103
`southamerica`,
76104
`etcetera`,
77-
`systemv`,
78105
]
79106

80107
// we don't include any historical rules older than this

0 commit comments

Comments
 (0)