Skip to content

Commit

Permalink
Update zoneinfo files and tzfile.h to 2018c-20-ga6cc661.
Browse files Browse the repository at this point in the history
For the time being we comment out the tests for pre-1913
offsets in America/Jamaica.
  • Loading branch information
devbww committed Feb 6, 2018
1 parent 7a97a6f commit e19879d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 6 deletions.
11 changes: 8 additions & 3 deletions src/time_zone_lookup_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1143,17 +1143,22 @@ TEST(TimeZoneEdgeCase, AmericaJamaica) {

// Before the first transition.
auto tp = convert(civil_second(1889, 12, 31, 0, 0, 0), tz);
ExpectTime(tp, tz, 1889, 12, 31, 0, 0, 0, -18431, false,
#if AMERICA_JAMAICA_PRE_1913_OFFSET_FIX
// Commit 907241e: Fix off-by-1 error for Jamaica and T&C before 1913.
// Until that commit has made its way into a full release we avoid the
// expectations on the -18430 offset below. TODO: Uncomment these.
ExpectTime(tp, tz, 1889, 12, 31, 0, 0, 0, -18430, false,
tz.lookup(tp).abbr);

// Over the first (abbreviation-change only) transition.
// -2524503170 == Tue, 31 Dec 1889 23:59:59 -0507 (LMT)
// -2524503169 == Wed, 1 Jan 1890 00:00:00 -0507 (KMT)
tp = convert(civil_second(1889, 12, 31, 23, 59, 59), tz);
ExpectTime(tp, tz, 1889, 12, 31, 23, 59, 59, -18431, false,
ExpectTime(tp, tz, 1889, 12, 31, 23, 59, 59, -18430, false,
tz.lookup(tp).abbr);
tp += seconds(1);
ExpectTime(tp, tz, 1890, 1, 1, 0, 0, 0, -18431, false, "KMT");
ExpectTime(tp, tz, 1890, 1, 1, 0, 0, 0, -18430, false, "KMT");
#endif

// Over the last (DST) transition.
// 436341599 == Sun, 30 Oct 1983 01:59:59 -0400 (EDT)
Expand Down
4 changes: 2 additions & 2 deletions src/tzfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
*/

#ifndef TZDIR
#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */
#define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */
#endif /* !defined TZDIR */

#ifndef TZDEFAULT
#define TZDEFAULT "localtime"
#define TZDEFAULT "/etc/localtime"
#endif /* !defined TZDEFAULT */

#ifndef TZDEFRULES
Expand Down
3 changes: 3 additions & 0 deletions testdata/README.zoneinfo
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ New versions can be generated using the following shell script.
LOCALTIME=Factory \
TZDATA_TEXT= \
ZONETABLES=zone1970.tab
tar --create --dereference --hard-dereference --file tzfile.tar \
--directory=tz tzfile.h
tar --create --dereference --hard-dereference --file zoneinfo.tar \
--exclude=zoneinfo/posixrules zoneinfo \
--directory=tz version
)
tar --extract --directory src --file ${DESTDIR}/tzfile.tar
tar --extract --directory testdata --file ${DESTDIR}/zoneinfo.tar
exit 0

Expand Down
2 changes: 1 addition & 1 deletion testdata/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2018c-2-gec1c7bf
2018c-20-ga6cc661
Binary file modified testdata/zoneinfo/America/Grand_Turk
Binary file not shown.
Binary file modified testdata/zoneinfo/America/Jamaica
Binary file not shown.
Binary file modified testdata/zoneinfo/Jamaica
Binary file not shown.
Binary file modified testdata/zoneinfo/Pacific/Enderbury
Binary file not shown.
Binary file modified testdata/zoneinfo/Pacific/Kiritimati
Binary file not shown.

0 comments on commit e19879d

Please sign in to comment.