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