Lines Matching refs:time_sec
202 void DateCache::ExtendTheAfterSegment(int time_sec, int offset_ms) { in ExtendTheAfterSegment() argument
204 after_->start_sec <= time_sec + kDefaultDSTDeltaInSec && in ExtendTheAfterSegment()
205 time_sec <= after_->end_sec) { in ExtendTheAfterSegment()
207 after_->start_sec = time_sec; in ExtendTheAfterSegment()
214 after_->start_sec = time_sec; in ExtendTheAfterSegment()
215 after_->end_sec = time_sec; in ExtendTheAfterSegment()
223 int time_sec = (time_ms >= 0 && time_ms <= kMaxEpochTimeInMs) in DaylightSavingsOffsetInMs() local
238 if (before_->start_sec <= time_sec && in DaylightSavingsOffsetInMs()
239 time_sec <= before_->end_sec) { in DaylightSavingsOffsetInMs()
245 ProbeDST(time_sec); in DaylightSavingsOffsetInMs()
247 ASSERT(InvalidSegment(before_) || before_->start_sec <= time_sec); in DaylightSavingsOffsetInMs()
248 ASSERT(InvalidSegment(after_) || time_sec < after_->start_sec); in DaylightSavingsOffsetInMs()
252 before_->start_sec = time_sec; in DaylightSavingsOffsetInMs()
253 before_->end_sec = time_sec; in DaylightSavingsOffsetInMs()
254 before_->offset_ms = GetDaylightSavingsOffsetFromOS(time_sec); in DaylightSavingsOffsetInMs()
259 if (time_sec <= before_->end_sec) { in DaylightSavingsOffsetInMs()
265 if (time_sec > before_->end_sec + kDefaultDSTDeltaInSec) { in DaylightSavingsOffsetInMs()
268 int offset_ms = GetDaylightSavingsOffsetFromOS(time_sec); in DaylightSavingsOffsetInMs()
269 ExtendTheAfterSegment(time_sec, offset_ms); in DaylightSavingsOffsetInMs()
308 int middle_sec = (i == 0) ? time_sec : before_->end_sec + delta / 2; in DaylightSavingsOffsetInMs()
312 if (time_sec <= before_->end_sec) { in DaylightSavingsOffsetInMs()
318 if (time_sec >= after_->start_sec) { in DaylightSavingsOffsetInMs()
332 void DateCache::ProbeDST(int time_sec) { in ProbeDST() argument
338 if (dst_[i].start_sec <= time_sec) { in ProbeDST()
342 } else if (time_sec < dst_[i].end_sec) { in ProbeDST()
362 ASSERT(InvalidSegment(before) || before->start_sec <= time_sec); in ProbeDST()
363 ASSERT(InvalidSegment(after) || time_sec < after->start_sec); in ProbeDST()