Home | History | Annotate | Download | only in src

Lines Matching full:time_sec

202 void DateCache::ExtendTheAfterSegment(int time_sec, int offset_ms) {
204 after_->start_sec <= time_sec + kDefaultDSTDeltaInSec &&
205 time_sec <= after_->end_sec) {
207 after_->start_sec = time_sec;
214 after_->start_sec = time_sec;
215 after_->end_sec = time_sec;
223 int time_sec = (time_ms >= 0 && time_ms <= kMaxEpochTimeInMs)
238 if (before_->start_sec <= time_sec &&
239 time_sec <= before_->end_sec) {
245 ProbeDST(time_sec);
247 ASSERT(InvalidSegment(before_) || before_->start_sec <= time_sec);
248 ASSERT(InvalidSegment(after_) || time_sec < after_->start_sec);
252 before_->start_sec = time_sec;
253 before_->end_sec = time_sec;
254 before_->offset_ms = GetDaylightSavingsOffsetFromOS(time_sec);
259 if (time_sec <= before_->end_sec) {
265 if (time_sec > before_->end_sec + kDefaultDSTDeltaInSec) {
267 // query for the offset of the time_sec
268 int offset_ms = GetDaylightSavingsOffsetFromOS(time_sec);
269 ExtendTheAfterSegment(time_sec, offset_ms);
277 // Now the time_sec is between
294 // Now the time_sec is between before_->end_sec and after_->start_sec.
308 int middle_sec = (i == 0) ? time_sec : before_->end_sec + delta / 2;
312 if (time_sec <= before_->end_sec) {
318 if (time_sec >= after_->start_sec) {
332 void DateCache::ProbeDST(int time_sec) {
338 if (dst_[i].start_sec <= time_sec) {
342 } else if (time_sec < dst_[i].end_sec) {
362 ASSERT(InvalidSegment(before) || before->start_sec <= time_sec);
363 ASSERT(InvalidSegment(after) || time_sec < after->start_sec);