CONTRIBUTING revision 1.4 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.3 christos For more-elaborate changes, please read the theory.html file and browse
21 1.3 christos the mailing list archives <https://mm.icann.org/pipermail/tz/> for
22 1.3 christos examples of patches that tend to work well. Additions to
23 1.1 christos data should contain commentary citing reliable sources as
24 1.3 christos justification. Citations should use https: URLs if available.
25 1.1 christos
26 1.1 christos Please submit changes against either the latest release in
27 1.3 christos <https://www.iana.org/time-zones> or the master branch of the development
28 1.4 christos repository. The latter is preferred. If you use Git the following
29 1.4 christos workflow may be helpful:
30 1.1 christos
31 1.2 christos * Copy the development repository.
32 1.1 christos
33 1.1 christos git clone https://github.com/eggert/tz.git
34 1.1 christos cd tz
35 1.1 christos
36 1.1 christos * Get current with the master branch.
37 1.1 christos
38 1.1 christos git checkout master
39 1.1 christos git pull
40 1.1 christos
41 1.1 christos * Switch to a new branch for the changes. Choose a different
42 1.1 christos branch name for each change set.
43 1.1 christos
44 1.1 christos git checkout -b mybranch
45 1.1 christos
46 1.4 christos * Sleuth by using 'git blame'. For example, when fixing data for
47 1.4 christos Africa/Sao_Tome, if the command 'git blame africa' outputs a line
48 1.4 christos '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
49 1.4 christos Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
50 1.4 christos provide some justification for the 'Zone Africa/Sao_Tome' line.
51 1.4 christos
52 1.1 christos * Edit source files. Include commentary that justifies the
53 1.1 christos changes by citing reliable sources.
54 1.1 christos
55 1.1 christos * Debug the changes, e.g.:
56 1.1 christos
57 1.1 christos make check
58 1.1 christos make install
59 1.1 christos ./zdump -v America/Los_Angeles
60 1.1 christos
61 1.1 christos * For each separable change, commit it in the new branch, e.g.:
62 1.1 christos
63 1.1 christos git add northamerica
64 1.1 christos git commit
65 1.1 christos
66 1.1 christos See recent 'git log' output for the commit-message style.
67 1.1 christos
68 1.1 christos * Create patch files 0001-*, 0002-*, ...
69 1.1 christos
70 1.1 christos git format-patch master
71 1.1 christos
72 1.1 christos * After reviewing the patch files, send the patches to tz (a] iana.org
73 1.1 christos for others to review.
74 1.1 christos
75 1.1 christos git send-email master
76 1.1 christos
77 1.4 christos For an archived example of such an email, see
78 1.4 christos <https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
79 1.4 christos
80 1.1 christos * Start anew by getting current with the master branch again
81 1.1 christos (the second step above).
82 1.1 christos
83 1.1 christos Please do not create issues or pull requests on GitHub, as the
84 1.1 christos proper procedure for proposing and distributing patches is via
85 1.1 christos email as illustrated above.
86