113f15878Skre# Contributing to the tz code and data 213f15878Skre 313f15878SkrePlease do not create issues or pull requests on GitHub, as the 413f15878Skreproper procedure for proposing and distributing patches is via 513f15878Skreemail as described below. 621158087Sapb 721158087SapbThe time zone database is by no means authoritative: governments 821158087Sapbchange timekeeping rules erratically and sometimes with little 921158087Sapbwarning, the data entries do not cover all of civil time before 1021158087Sapb1970, and undoubtedly errors remain in the code and data. Feel 1121158087Sapbfree to fill gaps or fix mistakes, and please email improvements 1213f15878Skreto <tz@iana.org> for use in the future. In your email, please give 13f2ef9bbcSkrereliable sources that reviewers can check. 14f2ef9bbcSkre 1513f15878Skre## Contributing technical changes 1621158087Sapb 1721158087SapbTo email small changes, please run a POSIX shell command like 1821158087Sapb'diff -u old/europe new/europe >myfix.patch', and attach 1913f15878Skre'myfix.patch' to the email. 2021158087Sapb 21*d703543aSkreFor more-elaborate or possibly controversial changes, 2218fef0bfSkresuch as renaming, adding or removing zones, please read 2313f15878Skre"Theory and pragmatics of the tz code and data" 2413f15878Skre<https://www.iana.org/time-zones/repository/theory.html>. 2513f15878SkreIt is also good to browse the mailing list archives 2618fef0bfSkre<https://mm.icann.org/pipermail/tz/> for examples of patches that tend 2718fef0bfSkreto work well. Additions to data should contain commentary citing 2813f15878Skrereliable sources as justification. Citations should use "https:" URLs 2918fef0bfSkreif available. 3021158087Sapb 3113f15878SkreFor changes that fix sensitive security-related bugs, please see the 3213f15878Skredistribution's 'SECURITY' file. 3313f15878Skre 3413f15878SkrePlease submit changes against either the latest release 3513f15878Skre<https://www.iana.org/time-zones> or the main branch of the development 3613f15878Skrerepository. The latter is preferred. 3713f15878Skre 3813f15878Skre## Sample Git workflow for developing contributions 3913f15878Skre 4013f15878SkreIf you use Git the following workflow may be helpful: 4121158087Sapb 427788f83dSkre * Copy the development repository. 4321158087Sapb 4421158087Sapb git clone https://github.com/eggert/tz.git 4521158087Sapb cd tz 4621158087Sapb 4713f15878Skre * Get current with the main branch. 4821158087Sapb 4913f15878Skre git checkout main 5021158087Sapb git pull 5121158087Sapb 5221158087Sapb * Switch to a new branch for the changes. Choose a different 5321158087Sapb branch name for each change set. 5421158087Sapb 5521158087Sapb git checkout -b mybranch 5621158087Sapb 5763a7dd43Skre * Sleuth by using 'git blame'. For example, when fixing data for 5863a7dd43Skre Africa/Sao_Tome, if the command 'git blame africa' outputs a line 5963a7dd43Skre '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone 6063a7dd43Skre Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should 6163a7dd43Skre provide some justification for the 'Zone Africa/Sao_Tome' line. 6263a7dd43Skre 6321158087Sapb * Edit source files. Include commentary that justifies the 6421158087Sapb changes by citing reliable sources. 6521158087Sapb 6621158087Sapb * Debug the changes, e.g.: 6721158087Sapb 6821158087Sapb make check 6921158087Sapb make install 7021158087Sapb ./zdump -v America/Los_Angeles 7121158087Sapb 7221158087Sapb * For each separable change, commit it in the new branch, e.g.: 7321158087Sapb 7421158087Sapb git add northamerica 7521158087Sapb git commit 7621158087Sapb 7721158087Sapb See recent 'git log' output for the commit-message style. 7821158087Sapb 7913f15878Skre * Create patch files 0001-..., 0002-..., ... 8021158087Sapb 8113f15878Skre git format-patch main 8221158087Sapb 8313f15878Skre * After reviewing the patch files, send the patches to <tz@iana.org> 8421158087Sapb for others to review. 8521158087Sapb 8613f15878Skre git send-email main 8721158087Sapb 8863a7dd43Skre For an archived example of such an email, see 8913f15878Skre "[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913" 9063a7dd43Skre <https://mm.icann.org/pipermail/tz/2018-February/026122.html>. 9163a7dd43Skre 9213f15878Skre * Start anew by getting current with the main branch again 9321158087Sapb (the second step above). 9421158087Sapb 9533a9650fSchristos----- 9633a9650fSchristos 9733a9650fSchristosThis file is in the public domain. 98