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