Remove unused field

This commit is contained in:
Alexey Milovidov 2021-03-03 23:14:33 +03:00
parent 3e19f4a00f
commit cf0912ba02
3 changed files with 0 additions and 4 deletions

View File

@ -54,7 +54,6 @@ DateLUTImpl::DateLUTImpl(const std::string & time_zone_)
const cctz::civil_day epoch{1970, 1, 1};
const cctz::civil_day lut_start{DATE_LUT_MIN_YEAR, 1, 1};
time_t start_of_day;
time_offset_epoch = cctz::convert(cctz::civil_second(lut_start), cctz_time_zone).time_since_epoch().count();
// Note: it's validated against all timezones in the system.
assert((epoch - lut_start) == daynum_offset_epoch);

View File

@ -169,7 +169,6 @@ private:
/// UTC offset at the beginning of the first supported year.
time_t offset_at_start_of_lut;
bool offset_is_whole_number_of_hours_everytime;
time_t time_offset_epoch;
/// Time zone name.
std::string time_zone;
@ -230,7 +229,6 @@ public:
// Methods only for unit-testing, it makes very little sense to use it from user code.
auto getOffsetAtStartOfEpoch() const { return offset_at_start_of_epoch; }
auto getOffsetIsWholNumberOfHoursEveryWhere() const { return offset_is_whole_number_of_hours_everytime; }
auto getTimeOffsetEpoch() const { return time_offset_epoch; }
auto getTimeOffsetAtStartOfLUT() const { return offset_at_start_of_lut; }
/// All functions below are thread-safe; arguments are not checked.

View File

@ -292,7 +292,6 @@ TEST_P(DateLUTWithTimeZone, VaidateTimeComponentsAroundEpoch)
<< "\n\ttimestamp: " << i
<< "\n\t offset at start of epoch : " << lut.getOffsetAtStartOfEpoch()
<< "\n\t offset_is_whole_number_of_hours_everytime : " << lut.getOffsetIsWholNumberOfHoursEveryWhere()
<< "\n\t time_offset_epoch : " << lut.getTimeOffsetEpoch()
<< "\n\t offset_at_start_of_lut : " << lut.getTimeOffsetAtStartOfLUT());
EXPECT_GE(24, lut.toHour(i));