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