Lines Matching refs:time_ms
53 static int DaysFromTime(int64_t time_ms) { in DaysFromTime() argument
54 if (time_ms < 0) time_ms -= (kMsPerDay - 1); in DaysFromTime()
55 return static_cast<int>(time_ms / kMsPerDay); in DaysFromTime()
61 static int TimeInDay(int64_t time_ms, int days) { in TimeInDay() argument
62 return static_cast<int>(time_ms - days * kMsPerDay); in TimeInDay()
86 const char* LocalTimezone(int64_t time_ms) { in LocalTimezone() argument
87 if (time_ms < 0 || time_ms > kMaxEpochTimeInMs) { in LocalTimezone()
88 time_ms = EquivalentTime(time_ms); in LocalTimezone()
90 bool is_dst = DaylightSavingsOffsetInMs(time_ms) != 0; in LocalTimezone()
93 *name = tz_cache_->LocalTimezone(static_cast<double>(time_ms)); in LocalTimezone()
99 int TimezoneOffset(int64_t time_ms) { in TimezoneOffset() argument
100 int64_t local_ms = ToLocal(time_ms); in TimezoneOffset()
101 return static_cast<int>((time_ms - local_ms) / kMsPerMin); in TimezoneOffset()
106 int64_t ToLocal(int64_t time_ms) { in ToLocal() argument
107 return time_ms + LocalOffsetInMs(time_ms, true); in ToLocal()
112 int64_t ToUTC(int64_t time_ms) { in ToUTC() argument
113 return time_ms - LocalOffsetInMs(time_ms, false); in ToUTC()
126 int64_t EquivalentTime(int64_t time_ms) { in EquivalentTime() argument
127 int days = DaysFromTime(time_ms); in EquivalentTime()
128 int time_within_day_ms = static_cast<int>(time_ms - days * kMsPerDay); in EquivalentTime()
156 void BreakDownTime(int64_t time_ms, int* year, int* month, int* day,
168 double time_ms = static_cast<double>(time_sec * 1000); in GetDaylightSavingsOffsetFromOS() local
169 return static_cast<int>(tz_cache_->DaylightSavingsOffset(time_ms)); in GetDaylightSavingsOffsetFromOS()
172 virtual int GetLocalOffsetFromOS(int64_t time_ms, bool is_utc);
196 int DaylightSavingsOffsetInMs(int64_t time_ms);