14616d0f9Sopenharmony_ci# Contributing to the tz code and data
24616d0f9Sopenharmony_ci
34616d0f9Sopenharmony_ciPlease do not create issues or pull requests on GitHub, as the
44616d0f9Sopenharmony_ciproper procedure for proposing and distributing patches is via
54616d0f9Sopenharmony_ciemail as described below.
64616d0f9Sopenharmony_ci
74616d0f9Sopenharmony_ciThe time zone database is by no means authoritative: governments
84616d0f9Sopenharmony_cichange timekeeping rules erratically and sometimes with little
94616d0f9Sopenharmony_ciwarning, the data entries do not cover all of civil time before
104616d0f9Sopenharmony_ci1970, and undoubtedly errors remain in the code and data.  Feel
114616d0f9Sopenharmony_cifree to fill gaps or fix mistakes, and please email improvements
124616d0f9Sopenharmony_cito <tz@iana.org> for use in the future.  In your email, please give
134616d0f9Sopenharmony_cireliable sources that reviewers can check.
144616d0f9Sopenharmony_ci
154616d0f9Sopenharmony_ci## Contributing technical changes
164616d0f9Sopenharmony_ci
174616d0f9Sopenharmony_ciTo email small changes, please run a POSIX shell command like
184616d0f9Sopenharmony_ci'diff -u old/europe new/europe >myfix.patch', and attach
194616d0f9Sopenharmony_ci'myfix.patch' to the email.
204616d0f9Sopenharmony_ci
214616d0f9Sopenharmony_ciFor more-elaborate or possibly controversial changes,
224616d0f9Sopenharmony_cisuch as renaming, adding or removing zones, please read
234616d0f9Sopenharmony_ci"Theory and pragmatics of the tz code and data"
244616d0f9Sopenharmony_ci<https://www.iana.org/time-zones/repository/theory.html>.
254616d0f9Sopenharmony_ciIt is also good to browse the mailing list archives
264616d0f9Sopenharmony_ci<https://mm.icann.org/pipermail/tz/> for examples of patches that tend
274616d0f9Sopenharmony_cito work well.  Additions to data should contain commentary citing
284616d0f9Sopenharmony_cireliable sources as justification.  Citations should use "https:" URLs
294616d0f9Sopenharmony_ciif available.
304616d0f9Sopenharmony_ci
314616d0f9Sopenharmony_ciFor changes that fix sensitive security-related bugs, please see the
324616d0f9Sopenharmony_cidistribution's 'SECURITY' file.
334616d0f9Sopenharmony_ci
344616d0f9Sopenharmony_ciPlease submit changes against either the latest release
354616d0f9Sopenharmony_ci<https://www.iana.org/time-zones> or the main branch of the development
364616d0f9Sopenharmony_cirepository.  The latter is preferred.
374616d0f9Sopenharmony_ci
384616d0f9Sopenharmony_ci## Sample Git workflow for developing contributions
394616d0f9Sopenharmony_ci
404616d0f9Sopenharmony_ciIf you use Git the following workflow may be helpful:
414616d0f9Sopenharmony_ci
424616d0f9Sopenharmony_ci  * Copy the development repository.
434616d0f9Sopenharmony_ci
444616d0f9Sopenharmony_ci        git clone https://github.com/eggert/tz.git
454616d0f9Sopenharmony_ci        cd tz
464616d0f9Sopenharmony_ci
474616d0f9Sopenharmony_ci  * Get current with the main branch.
484616d0f9Sopenharmony_ci
494616d0f9Sopenharmony_ci        git checkout main
504616d0f9Sopenharmony_ci        git pull
514616d0f9Sopenharmony_ci
524616d0f9Sopenharmony_ci  * Switch to a new branch for the changes.  Choose a different
534616d0f9Sopenharmony_ci    branch name for each change set.
544616d0f9Sopenharmony_ci
554616d0f9Sopenharmony_ci        git checkout -b mybranch
564616d0f9Sopenharmony_ci
574616d0f9Sopenharmony_ci  * Sleuth by using 'git blame'.  For example, when fixing data for
584616d0f9Sopenharmony_ci    Africa/Sao_Tome, if the command 'git blame africa' outputs a line
594616d0f9Sopenharmony_ci    '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
604616d0f9Sopenharmony_ci    Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
614616d0f9Sopenharmony_ci    provide some justification for the 'Zone Africa/Sao_Tome' line.
624616d0f9Sopenharmony_ci
634616d0f9Sopenharmony_ci  * Edit source files.  Include commentary that justifies the
644616d0f9Sopenharmony_ci    changes by citing reliable sources.
654616d0f9Sopenharmony_ci
664616d0f9Sopenharmony_ci  * Debug the changes, e.g.:
674616d0f9Sopenharmony_ci
684616d0f9Sopenharmony_ci        make check
694616d0f9Sopenharmony_ci        make install
704616d0f9Sopenharmony_ci        ./zdump -v America/Los_Angeles
714616d0f9Sopenharmony_ci
724616d0f9Sopenharmony_ci  * For each separable change, commit it in the new branch, e.g.:
734616d0f9Sopenharmony_ci
744616d0f9Sopenharmony_ci        git add northamerica
754616d0f9Sopenharmony_ci        git commit
764616d0f9Sopenharmony_ci
774616d0f9Sopenharmony_ci    See recent 'git log' output for the commit-message style.
784616d0f9Sopenharmony_ci
794616d0f9Sopenharmony_ci  * Create patch files 0001-..., 0002-..., ...
804616d0f9Sopenharmony_ci
814616d0f9Sopenharmony_ci        git format-patch main
824616d0f9Sopenharmony_ci
834616d0f9Sopenharmony_ci  * After reviewing the patch files, send the patches to <tz@iana.org>
844616d0f9Sopenharmony_ci    for others to review.
854616d0f9Sopenharmony_ci
864616d0f9Sopenharmony_ci        git send-email main
874616d0f9Sopenharmony_ci
884616d0f9Sopenharmony_ci    For an archived example of such an email, see
894616d0f9Sopenharmony_ci    "[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913"
904616d0f9Sopenharmony_ci    <https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
914616d0f9Sopenharmony_ci
924616d0f9Sopenharmony_ci  * Start anew by getting current with the main branch again
934616d0f9Sopenharmony_ci    (the second step above).
944616d0f9Sopenharmony_ci
954616d0f9Sopenharmony_ci-----
964616d0f9Sopenharmony_ci
974616d0f9Sopenharmony_ciThis file is in the public domain.
98