CONTRIBUTING revision 1.9
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.3Schristosreliable sources that reviewers can check. 141.3Schristos 151.7Schristos## Contributing technical changes 161.1Schristos 171.1SchristosTo email small changes, please run a POSIX shell command like 181.1Schristos'diff -u old/europe new/europe >myfix.patch', and attach 191.7Schristos'myfix.patch' to the email. 201.1Schristos 211.8SchristosFor more-elaborate or possibly controversial changes, 221.5Schristossuch as renaming, adding or removing zones, please read 231.7Schristos"Theory and pragmatics of the tz code and data" 241.7Schristos<https://www.iana.org/time-zones/repository/theory.html>. 251.7SchristosIt is also good to browse the mailing list archives 261.9Schristos<https://lists.iana.org/hyperkitty/list/tz@iana.org/> 271.9Schristosfor examples of patches that tend to work well. 281.9SchristosChanges should contain commentary citing reliable sources. 291.9SchristosCitations should use "https:" URLs if available. 301.1Schristos 311.6SchristosFor changes that fix sensitive security-related bugs, please see the 321.7Schristosdistribution's 'SECURITY' file. 331.6Schristos 341.7SchristosPlease submit changes against either the latest release 351.6Schristos<https://www.iana.org/time-zones> or the main branch of the development 361.7Schristosrepository. The latter is preferred. 371.7Schristos 381.7Schristos## Sample Git workflow for developing contributions 391.7Schristos 401.7SchristosIf you use Git the following workflow may be helpful: 411.1Schristos 421.2Schristos * Copy the development repository. 431.1Schristos 441.7Schristos git clone https://github.com/eggert/tz.git 451.7Schristos cd tz 461.1Schristos 471.6Schristos * Get current with the main branch. 481.1Schristos 491.7Schristos git checkout main 501.7Schristos git pull 511.1Schristos 521.1Schristos * Switch to a new branch for the changes. Choose a different 531.1Schristos branch name for each change set. 541.1Schristos 551.7Schristos git checkout -b mybranch 561.1Schristos 571.4Schristos * Sleuth by using 'git blame'. For example, when fixing data for 581.4Schristos Africa/Sao_Tome, if the command 'git blame africa' outputs a line 591.4Schristos '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone 601.4Schristos Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should 611.4Schristos provide some justification for the 'Zone Africa/Sao_Tome' line. 621.4Schristos 631.1Schristos * Edit source files. Include commentary that justifies the 641.1Schristos changes by citing reliable sources. 651.1Schristos 661.9Schristos * Debug the changes locally, e.g.: 671.1Schristos 681.9Schristos make TOPDIR=$PWD/tz clean check install 691.7Schristos ./zdump -v America/Los_Angeles 701.1Schristos 711.9Schristos Although builds assume only basic POSIX, they use extra features 721.9Schristos if available. 'make check' accesses validator.w3.org unless you 731.9Schristos lack 'curl' or use 'make CURL=:'. If you have the latest GCC, 741.9Schristos "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking. 751.9Schristos 761.1Schristos * For each separable change, commit it in the new branch, e.g.: 771.1Schristos 781.7Schristos git add northamerica 791.7Schristos git commit 801.1Schristos 811.1Schristos See recent 'git log' output for the commit-message style. 821.1Schristos 831.7Schristos * Create patch files 0001-..., 0002-..., ... 841.1Schristos 851.7Schristos git format-patch main 861.1Schristos 871.7Schristos * After reviewing the patch files, send the patches to <tz@iana.org> 881.1Schristos for others to review. 891.1Schristos 901.7Schristos git send-email main 911.1Schristos 921.4Schristos For an archived example of such an email, see 931.7Schristos "[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913" 941.4Schristos <https://mm.icann.org/pipermail/tz/2018-February/026122.html>. 951.4Schristos 961.6Schristos * Start anew by getting current with the main branch again 971.1Schristos (the second step above). 981.1Schristos 991.7Schristos----- 1001.7Schristos 1011.7SchristosThis file is in the public domain. 102