CONTRIBUTING revision 1.5 1 1.1 christos Contributing to the tz code and data
2 1.1 christos
3 1.1 christos The time zone database is by no means authoritative: governments
4 1.1 christos change timekeeping rules erratically and sometimes with little
5 1.1 christos warning, the data entries do not cover all of civil time before
6 1.1 christos 1970, and undoubtedly errors remain in the code and data. Feel
7 1.1 christos free to fill gaps or fix mistakes, and please email improvements
8 1.3 christos to tz (a] iana.org for use in the future. In your email, please give
9 1.3 christos reliable sources that reviewers can check.
10 1.3 christos
11 1.3 christos -----
12 1.3 christos
13 1.3 christos Developers can contribute technical changes to the source code and
14 1.3 christos data as follows.
15 1.1 christos
16 1.1 christos To email small changes, please run a POSIX shell command like
17 1.1 christos 'diff -u old/europe new/europe >myfix.patch', and attach
18 1.1 christos myfix.patch to the email.
19 1.1 christos
20 1.5 christos For more-elaborate or possibly-controversial changes,
21 1.5 christos such as renaming, adding or removing zones, please read
22 1.5 christos <https://www.iana.org/time-zones/repository/theory.html> or the file
23 1.5 christos theory.html. It is also good to browse the mailing list archives
24 1.5 christos <https://mm.icann.org/pipermail/tz/> for examples of patches that tend
25 1.5 christos to work well. Additions to data should contain commentary citing
26 1.5 christos reliable sources as justification. Citations should use https: URLs
27 1.5 christos if available.
28 1.1 christos
29 1.1 christos Please submit changes against either the latest release in
30 1.3 christos <https://www.iana.org/time-zones> or the master branch of the development
31 1.4 christos repository. The latter is preferred. If you use Git the following
32 1.4 christos workflow may be helpful:
33 1.1 christos
34 1.2 christos * Copy the development repository.
35 1.1 christos
36 1.1 christos git clone https://github.com/eggert/tz.git
37 1.1 christos cd tz
38 1.1 christos
39 1.1 christos * Get current with the master branch.
40 1.1 christos
41 1.1 christos git checkout master
42 1.1 christos git pull
43 1.1 christos
44 1.1 christos * Switch to a new branch for the changes. Choose a different
45 1.1 christos branch name for each change set.
46 1.1 christos
47 1.1 christos git checkout -b mybranch
48 1.1 christos
49 1.4 christos * Sleuth by using 'git blame'. For example, when fixing data for
50 1.4 christos Africa/Sao_Tome, if the command 'git blame africa' outputs a line
51 1.4 christos '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
52 1.4 christos Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
53 1.4 christos provide some justification for the 'Zone Africa/Sao_Tome' line.
54 1.4 christos
55 1.1 christos * Edit source files. Include commentary that justifies the
56 1.1 christos changes by citing reliable sources.
57 1.1 christos
58 1.1 christos * Debug the changes, e.g.:
59 1.1 christos
60 1.1 christos make check
61 1.1 christos make install
62 1.1 christos ./zdump -v America/Los_Angeles
63 1.1 christos
64 1.1 christos * For each separable change, commit it in the new branch, e.g.:
65 1.1 christos
66 1.1 christos git add northamerica
67 1.1 christos git commit
68 1.1 christos
69 1.1 christos See recent 'git log' output for the commit-message style.
70 1.1 christos
71 1.1 christos * Create patch files 0001-*, 0002-*, ...
72 1.1 christos
73 1.1 christos git format-patch master
74 1.1 christos
75 1.1 christos * After reviewing the patch files, send the patches to tz (a] iana.org
76 1.1 christos for others to review.
77 1.1 christos
78 1.1 christos git send-email master
79 1.1 christos
80 1.4 christos For an archived example of such an email, see
81 1.4 christos <https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
82 1.4 christos
83 1.1 christos * Start anew by getting current with the master branch again
84 1.1 christos (the second step above).
85 1.1 christos
86 1.1 christos Please do not create issues or pull requests on GitHub, as the
87 1.1 christos proper procedure for proposing and distributing patches is via
88 1.1 christos email as illustrated above.
89