Lines Matching refs:time_ms
56 // Computes floor(time_ms / kMsPerDay).
57 static int DaysFromTime(int64_t time_ms) {
58 if (time_ms < 0) time_ms -= (kMsPerDay - 1);
59 return static_cast<int>(time_ms / kMsPerDay);
63 // Computes modulo(time_ms, kMsPerDay) given that
64 // days = floor(time_ms / kMsPerDay).
65 static int TimeInDay(int64_t time_ms, int days) {
66 return static_cast<int>(time_ms - days * kMsPerDay);
92 const char* LocalTimezone(int64_t time_ms) {
93 if (time_ms < 0 || time_ms > kMaxEpochTimeInMs) {
94 time_ms = EquivalentTime(time_ms);
96 return base::OS::LocalTimezone(static_cast<double>(time_ms), tz_cache_);
100 int TimezoneOffset(int64_t time_ms) {
101 int64_t local_ms = ToLocal(time_ms);
102 return static_cast<int>((time_ms - local_ms) / kMsPerMin);
107 int64_t ToLocal(int64_t time_ms) {
108 return time_ms + LocalOffsetInMs() + DaylightSavingsOffsetInMs(time_ms);
113 int64_t ToUTC(int64_t time_ms) {
150 time_ms -= LocalOffsetInMs();
151 return time_ms - DaylightSavingsOffsetInMs(time_ms - kMsPerHour);
164 int64_t EquivalentTime(int64_t time_ms) {
165 int days = DaysFromTime(time_ms);
166 int time_within_day_ms = static_cast<int>(time_ms - days * kMsPerDay);
194 void BreakDownTime(int64_t time_ms, int* year, int* month, int* day,
206 double time_ms = static_cast<double>(time_sec * 1000);
208 base::OS::DaylightSavingsOffset(time_ms, tz_cache_));
239 int DaylightSavingsOffsetInMs(int64_t time_ms);