CONTRIBUTING 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. Contributing to the tz code and data
  2. The time zone database is by no means authoritative: governments
  3. change timekeeping rules erratically and sometimes with little
  4. warning, the data entries do not cover all of civil time before
  5. 1970, and undoubtedly errors remain in the code and data. Feel
  6. free to fill gaps or fix mistakes, and please email improvements
  7. to tz@iana.org for use in the future. In your email, please give
  8. reliable sources that reviewers can check.
  9. -----
  10. Developers can contribute technical changes to the source code and
  11. data as follows.
  12. To email small changes, please run a POSIX shell command like
  13. 'diff -u old/europe new/europe >myfix.patch', and attach
  14. myfix.patch to the email.
  15. For more-elaborate or possibly-controversial changes,
  16. such as renaming, adding or removing zones, please read
  17. <https://www.iana.org/time-zones/repository/theory.html> or the file
  18. theory.html. It is also good to browse the mailing list archives
  19. <https://mm.icann.org/pipermail/tz/> for examples of patches that tend
  20. to work well. Additions to data should contain commentary citing
  21. reliable sources as justification. Citations should use https: URLs
  22. if available.
  23. For changes that fix sensitive security-related bugs, please see the
  24. file SECURITY.
  25. Please submit changes against either the latest release in
  26. <https://www.iana.org/time-zones> or the main branch of the development
  27. repository. The latter is preferred. If you use Git the following
  28. workflow may be helpful:
  29. * Copy the development repository.
  30. git clone https://github.com/eggert/tz.git
  31. cd tz
  32. * Get current with the main branch.
  33. git checkout main
  34. git pull
  35. * Switch to a new branch for the changes. Choose a different
  36. branch name for each change set.
  37. git checkout -b mybranch
  38. * Sleuth by using 'git blame'. For example, when fixing data for
  39. Africa/Sao_Tome, if the command 'git blame africa' outputs a line
  40. '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
  41. Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
  42. provide some justification for the 'Zone Africa/Sao_Tome' line.
  43. * Edit source files. Include commentary that justifies the
  44. changes by citing reliable sources.
  45. * Debug the changes, e.g.:
  46. make check
  47. make install
  48. ./zdump -v America/Los_Angeles
  49. * For each separable change, commit it in the new branch, e.g.:
  50. git add northamerica
  51. git commit
  52. See recent 'git log' output for the commit-message style.
  53. * Create patch files 0001-*, 0002-*, ...
  54. git format-patch main
  55. * After reviewing the patch files, send the patches to tz@iana.org
  56. for others to review.
  57. git send-email main
  58. For an archived example of such an email, see
  59. <https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
  60. * Start anew by getting current with the main branch again
  61. (the second step above).
  62. Please do not create issues or pull requests on GitHub, as the
  63. proper procedure for proposing and distributing patches is via
  64. email as illustrated above.
  65. -----
  66. This file is in the public domain.