Lines Matching refs:time_sec
278 void DateCache::ExtendTheAfterSegment(int time_sec, int offset_ms) {
280 after_->start_sec - kDefaultDSTDeltaInSec <= time_sec &&
281 time_sec <= after_->end_sec) {
283 after_->start_sec = time_sec;
290 after_->start_sec = time_sec;
291 after_->end_sec = time_sec;
298 int time_sec = (time_ms >= 0 && time_ms <= kMaxEpochTimeInMs)
313 if (before_->start_sec <= time_sec && time_sec <= before_->end_sec) {
319 ProbeDST(time_sec);
321 DCHECK(InvalidSegment(before_) || before_->start_sec <= time_sec);
322 DCHECK(InvalidSegment(after_) || time_sec < after_->start_sec);
326 before_->start_sec = time_sec;
327 before_->end_sec = time_sec;
328 before_->offset_ms = GetDaylightSavingsOffsetFromOS(time_sec);
333 if (time_sec <= before_->end_sec) {
339 if (time_sec - kDefaultDSTDeltaInSec > before_->end_sec) {
341 // query for the offset of the time_sec
342 int offset_ms = GetDaylightSavingsOffsetFromOS(time_sec);
343 ExtendTheAfterSegment(time_sec, offset_ms);
351 // Now the time_sec is between
371 // Now the time_sec is between before_->end_sec and after_->start_sec.
385 int middle_sec = (i == 0) ? time_sec : before_->end_sec + delta / 2;
389 if (time_sec <= before_->end_sec) {
395 if (time_sec >= after_->start_sec) {
407 void DateCache::ProbeDST(int time_sec) {
413 if (dst_[i].start_sec <= time_sec) {
417 } else if (time_sec < dst_[i].end_sec) {
438 DCHECK(InvalidSegment(before) || before->start_sec <= time_sec);
439 DCHECK(InvalidSegment(after) || time_sec < after->start_sec);