about summary refs log tree commit diff
path: root/absl/time/internal/cctz/src
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-07-03T19·13-0700
committerMark Barolak <mbar@google.com>2019-07-03T19·18-0400
commit74d91756c11bc22f9b0108b94da9326f7f9e376f (patch)
treeabac4dca828794666850bb88f0445fbf92b15a0b /absl/time/internal/cctz/src
parente6b050212c859fbaf67abac76105da10ec348274 (diff)
Export of internal Abseil changes.
--
a874475e842d2adeb31bb7bd37bdd6eb15a2aeb9 by Mark Barolak <mbar@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 256414250

--
c95e6c21944c59c9b9b9e7eb9dc79cfb9ae5ef8d by CJ Johnson <johnsoncj@google.com>:

Update the license year + run clang-format for the FixedArray and InlinedVector test files

PiperOrigin-RevId: 256376285

--
f430b04f332d6b89cb8447b07217e391e1c38000 by Derek Mauro <dmauro@google.com>:

Migrate the Linux CMake tests from GCC 4.8 to the GCC latest
version. This will allow us to delete the GCC 4.8 test since that is
currently our only CMake coverage. This also means that we don't have
to update the script every time we move to a new minumum GCC version.

This change includes a fix for a -Wstringops-truncation warning in
symbolize_test.cc that triggers when it is built in release mode with
the latest GCC.

PiperOrigin-RevId: 256370092
GitOrigin-RevId: a874475e842d2adeb31bb7bd37bdd6eb15a2aeb9
Change-Id: Ia2ec58f9b9dfc382d043344e346cb397b802270a
Diffstat (limited to 'absl/time/internal/cctz/src')
-rw-r--r--absl/time/internal/cctz/src/time_zone_info.cc10
-rw-r--r--absl/time/internal/cctz/src/time_zone_info.h2
-rw-r--r--absl/time/internal/cctz/src/tzfile.h17
3 files changed, 15 insertions, 14 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_info.cc b/absl/time/internal/cctz/src/time_zone_info.cc
index 72bb3bde8eae..9db72e0c50fe 100644
--- a/absl/time/internal/cctz/src/time_zone_info.cc
+++ b/absl/time/internal/cctz/src/time_zone_info.cc
@@ -239,8 +239,8 @@ bool TimeZoneInfo::Header::Build(const tzhead& tzh) {
   leapcnt = static_cast<std::size_t>(v);
   if ((v = Decode32(tzh.tzh_ttisstdcnt)) < 0) return false;
   ttisstdcnt = static_cast<std::size_t>(v);
-  if ((v = Decode32(tzh.tzh_ttisgmtcnt)) < 0) return false;
-  ttisgmtcnt = static_cast<std::size_t>(v);
+  if ((v = Decode32(tzh.tzh_ttisutcnt)) < 0) return false;
+  ttisutcnt = static_cast<std::size_t>(v);
   return true;
 }
 
@@ -253,7 +253,7 @@ std::size_t TimeZoneInfo::Header::DataLength(std::size_t time_len) const {
   len += 1 * charcnt;               // abbreviations
   len += (time_len + 4) * leapcnt;  // leap-time + TAI-UTC
   len += 1 * ttisstdcnt;            // UTC/local indicators
-  len += 1 * ttisgmtcnt;            // standard/wall indicators
+  len += 1 * ttisutcnt;             // standard/wall indicators
   return len;
 }
 
@@ -427,7 +427,7 @@ bool TimeZoneInfo::Load(const std::string& name, ZoneInfoSource* zip) {
   }
   if (hdr.ttisstdcnt != 0 && hdr.ttisstdcnt != hdr.typecnt)
     return false;
-  if (hdr.ttisgmtcnt != 0 && hdr.ttisgmtcnt != hdr.typecnt)
+  if (hdr.ttisutcnt != 0 && hdr.ttisutcnt != hdr.typecnt)
     return false;
 
   // Read the data into a local buffer.
@@ -498,7 +498,7 @@ bool TimeZoneInfo::Load(const std::string& name, ZoneInfoSource* zip) {
   // that isn't the case here (see "zic -p").
   bp += (8 + 4) * hdr.leapcnt;  // leap-time + TAI-UTC
   bp += 1 * hdr.ttisstdcnt;     // UTC/local indicators
-  bp += 1 * hdr.ttisgmtcnt;     // standard/wall indicators
+  bp += 1 * hdr.ttisutcnt;      // standard/wall indicators
   assert(bp == tbuf.data() + tbuf.size());
 
   future_spec_.clear();
diff --git a/absl/time/internal/cctz/src/time_zone_info.h b/absl/time/internal/cctz/src/time_zone_info.h
index bff639f45ce3..81cd402f972a 100644
--- a/absl/time/internal/cctz/src/time_zone_info.h
+++ b/absl/time/internal/cctz/src/time_zone_info.h
@@ -88,7 +88,7 @@ class TimeZoneInfo : public TimeZoneIf {
     std::size_t charcnt;     // zone abbreviation characters
     std::size_t leapcnt;     // leap seconds (we expect none)
     std::size_t ttisstdcnt;  // UTC/local indicators (unused)
-    std::size_t ttisgmtcnt;  // standard/wall indicators (unused)
+    std::size_t ttisutcnt;   // standard/wall indicators (unused)
 
     bool Build(const tzhead& tzh);
     std::size_t DataLength(std::size_t time_len) const;
diff --git a/absl/time/internal/cctz/src/tzfile.h b/absl/time/internal/cctz/src/tzfile.h
index ef3feff0c7d8..51b1f1f3d83c 100644
--- a/absl/time/internal/cctz/src/tzfile.h
+++ b/absl/time/internal/cctz/src/tzfile.h
@@ -46,7 +46,7 @@ struct tzhead {
 	char	tzh_magic[4];		/* TZ_MAGIC */
 	char	tzh_version[1];		/* '\0' or '2' or '3' as of 2013 */
 	char	tzh_reserved[15];	/* reserved; must be zero */
-	char	tzh_ttisgmtcnt[4];	/* coded number of trans. time flags */
+	char	tzh_ttisutcnt[4];	/* coded number of trans. time flags */
 	char	tzh_ttisstdcnt[4];	/* coded number of trans. time flags */
 	char	tzh_leapcnt[4];		/* coded number of leap seconds */
 	char	tzh_timecnt[4];		/* coded number of transition times */
@@ -69,14 +69,15 @@ struct tzhead {
 **		one (char [4])		total correction after above
 **	tzh_ttisstdcnt (char)s		indexed by type; if 1, transition
 **					time is standard time, if 0,
-**					transition time is wall clock time
-**					if absent, transition times are
-**					assumed to be wall clock time
-**	tzh_ttisgmtcnt (char)s		indexed by type; if 1, transition
-**					time is UT, if 0,
-**					transition time is local time
-**					if absent, transition times are
+**					transition time is local (wall clock)
+**					time; if absent, transition times are
 **					assumed to be local time
+**	tzh_ttisutcnt (char)s		indexed by type; if 1, transition
+**					time is UT, if 0, transition time is
+**					local time; if absent, transition
+**					times are assumed to be local time.
+**					When this is 1, the corresponding
+**					std/wall indicator must also be 1.
 */
 
 /*