11.7Schristos# Contributing to the tz code and data 21.7Schristos 31.7SchristosPlease do not create issues or pull requests on GitHub, as the 41.7Schristosproper procedure for proposing and distributing patches is via 51.7Schristosemail as described below. 61.1Schristos 71.1SchristosThe time zone database is by no means authoritative: governments 81.1Schristoschange timekeeping rules erratically and sometimes with little 91.1Schristoswarning, the data entries do not cover all of civil time before 101.1Schristos1970, and undoubtedly errors remain in the code and data. Feel 111.1Schristosfree to fill gaps or fix mistakes, and please email improvements 121.7Schristosto <tz@iana.org> for use in the future. In your email, please give 131.10Schristosreliable sources that reviewers can check. The mailing list and its 141.10Schristosarchives are public, so please do not send confidential information. 151.3Schristos 161.7Schristos## Contributing technical changes 171.1Schristos 181.1SchristosTo email small changes, please run a POSIX shell command like 191.10Schristos‘diff -u old/europe new/europe >myfix.patch’, and attach 201.10Schristos‘myfix.patch’ to the email. 211.1Schristos 221.8SchristosFor more-elaborate or possibly controversial changes, 231.5Schristossuch as renaming, adding or removing zones, please read 241.10Schristos“Theory and pragmatics of the tz code and data” 251.7Schristos<https://www.iana.org/time-zones/repository/theory.html>. 261.7SchristosIt is also good to browse the mailing list archives 271.9Schristos<https://lists.iana.org/hyperkitty/list/tz@iana.org/> 281.9Schristosfor examples of patches that tend to work well. 291.9SchristosChanges should contain commentary citing reliable sources. 301.10SchristosCitations should use ‘https:’ URLs if available. 311.1Schristos 321.6SchristosFor changes that fix sensitive security-related bugs, please see the 331.10Schristosdistribution’s SECURITY file. 341.6Schristos 351.7SchristosPlease submit changes against either the latest release 361.6Schristos<https://www.iana.org/time-zones> or the main branch of the development 371.7Schristosrepository. The latter is preferred. 381.7Schristos 391.7Schristos## Sample Git workflow for developing contributions 401.7Schristos 411.7SchristosIf you use Git the following workflow may be helpful: 421.1Schristos 431.2Schristos * Copy the development repository. 441.1Schristos 451.7Schristos git clone https://github.com/eggert/tz.git 461.7Schristos cd tz 471.1Schristos 481.6Schristos * Get current with the main branch. 491.1Schristos 501.7Schristos git checkout main 511.7Schristos git pull 521.1Schristos 531.1Schristos * Switch to a new branch for the changes. Choose a different 541.1Schristos branch name for each change set. 551.1Schristos 561.7Schristos git checkout -b mybranch 571.1Schristos 581.10Schristos * Sleuth by using ‘git blame’. For example, when fixing data for 591.10Schristos Africa/Sao_Tome, if the command ‘git blame africa’ outputs a line 601.10Schristos ‘2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone 611.10Schristos Africa/Sao_Tome 0:26:56 - LMT 1884’, commit 2951fa3b should 621.10Schristos provide some justification for the ‘Zone Africa/Sao_Tome’ line. 631.4Schristos 641.1Schristos * Edit source files. Include commentary that justifies the 651.1Schristos changes by citing reliable sources. 661.1Schristos 671.9Schristos * Debug the changes locally, e.g.: 681.1Schristos 691.9Schristos make TOPDIR=$PWD/tz clean check install 701.7Schristos ./zdump -v America/Los_Angeles 711.1Schristos 721.9Schristos Although builds assume only basic POSIX, they use extra features 731.10Schristos if available. ‘make check’ accesses validator.w3.org unless you 741.10Schristos lack ‘curl’ or use ‘make CURL=:’. If you have the latest GCC, 751.10Schristos ‘make CFLAGS='$(GCC_DEBUG_FLAGS)'’ does extra checking. 761.9Schristos 771.1Schristos * For each separable change, commit it in the new branch, e.g.: 781.1Schristos 791.7Schristos git add northamerica 801.7Schristos git commit 811.1Schristos 821.10Schristos See recent ‘git log’ output for the commit-message style. 831.1Schristos 841.7Schristos * Create patch files 0001-..., 0002-..., ... 851.1Schristos 861.7Schristos git format-patch main 871.1Schristos 881.10Schristos * Check that the patch files and your email setup contain only 891.10Schristos information that you want to make public. 901.10Schristos 911.7Schristos * After reviewing the patch files, send the patches to <tz@iana.org> 921.1Schristos for others to review. 931.1Schristos 941.7Schristos git send-email main 951.1Schristos 961.4Schristos For an archived example of such an email, see 971.10Schristos “[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913” 981.4Schristos <https://mm.icann.org/pipermail/tz/2018-February/026122.html>. 991.4Schristos 1001.6Schristos * Start anew by getting current with the main branch again 1011.1Schristos (the second step above). 1021.1Schristos 1031.7Schristos----- 1041.7Schristos 1051.7SchristosThis file is in the public domain. 106