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