Home | History | Annotate | Download | only in src

Lines Matching refs:time_sec

180 void DateCache::ExtendTheAfterSegment(int time_sec, int offset_ms) {
182 after_->start_sec <= time_sec + kDefaultDSTDeltaInSec &&
183 time_sec <= after_->end_sec) {
185 after_->start_sec = time_sec;
192 after_->start_sec = time_sec;
193 after_->end_sec = time_sec;
201 int time_sec = (time_ms >= 0 && time_ms <= kMaxEpochTimeInMs)
216 if (before_->start_sec <= time_sec &&
217 time_sec <= before_->end_sec) {
223 ProbeDST(time_sec);
225 DCHECK(InvalidSegment(before_) || before_->start_sec <= time_sec);
226 DCHECK(InvalidSegment(after_) || time_sec < after_->start_sec);
230 before_->start_sec = time_sec;
231 before_->end_sec = time_sec;
232 before_->offset_ms = GetDaylightSavingsOffsetFromOS(time_sec);
237 if (time_sec <= before_->end_sec) {
243 if (time_sec > before_->end_sec + kDefaultDSTDeltaInSec) {
245 // query for the offset of the time_sec
246 int offset_ms = GetDaylightSavingsOffsetFromOS(time_sec);
247 ExtendTheAfterSegment(time_sec, offset_ms);
255 // Now the time_sec is between
272 // Now the time_sec is between before_->end_sec and after_->start_sec.
286 int middle_sec = (i == 0) ? time_sec : before_->end_sec + delta / 2;
290 if (time_sec <= before_->end_sec) {
296 if (time_sec >= after_->start_sec) {
310 void DateCache::ProbeDST(int time_sec) {
316 if (dst_[i].start_sec <= time_sec) {
320 } else if (time_sec < dst_[i].end_sec) {
340 DCHECK(InvalidSegment(before) || before->start_sec <= time_sec);
341 DCHECK(InvalidSegment(after) || time_sec < after->start_sec);