Home | History | Annotate | Download | only in src

Lines Matching full:time_ms

76   // Computes floor(time_ms / kMsPerDay).
77 static int DaysFromTime(int64_t time_ms) {
78 if (time_ms < 0) time_ms -= (kMsPerDay - 1);
79 return static_cast<int>(time_ms / kMsPerDay);
83 // Computes modulo(time_ms, kMsPerDay) given that
84 // days = floor(time_ms / kMsPerDay).
85 static int TimeInDay(int64_t time_ms, int days) {
86 return static_cast<int>(time_ms - days * kMsPerDay);
112 const char* LocalTimezone(int64_t time_ms) {
113 if (time_ms < 0 || time_ms > kMaxEpochTimeInMs) {
114 time_ms = EquivalentTime(time_ms);
116 return OS::LocalTimezone(static_cast<double>(time_ms));
120 int TimezoneOffset(int64_t time_ms) {
121 int64_t local_ms = ToLocal(time_ms);
122 return static_cast<int>((time_ms - local_ms) / kMsPerMin);
126 int64_t ToLocal(int64_t time_ms) {
127 return time_ms + LocalOffsetInMs() + DaylightSavingsOffsetInMs(time_ms);
131 int64_t ToUTC(int64_t time_ms) {
132 time_ms -= LocalOffsetInMs();
133 return time_ms - DaylightSavingsOffsetInMs(time_ms);
146 int64_t EquivalentTime(int64_t time_ms) {
147 int days = DaysFromTime(time_ms);
148 int time_within_day_ms = static_cast<int>(time_ms - days * kMsPerDay);
184 double time_ms = static_cast<double>(time_sec * 1000);
185 return static_cast<int>(OS::DaylightSavingsOffset(time_ms));
216 int DaylightSavingsOffsetInMs(int64_t time_ms);