def _get_time_micros(self): """ Return the number of microseconds since midnight. Returns ------- ndarray[int64_t] """ values = self.asi8 if self.tz is not None and not timezones.is_utc(self.tz): values = self._data._local_timestamps() nanos = values % (24 * 3600 * 1_000_000_000) micros = nanos // 1000 micros[self._isnan] = -1 return micros
def _get_time_micros(self): values = self.asi8 if self.tz is not None and not timezones.is_utc(self.tz): values = self._data._local_timestamps() return fields.get_time_micros(values)
def test_tzlocal_is_not_utc(): # even if the machine running the test is localized to UTC tz = dateutil.tz.tzlocal() assert not timezones.is_utc(tz) assert not timezones.tz_compare(tz, dateutil.tz.tzutc())
def test_is_utc(utc_fixture): tz = timezones.maybe_get_tz(utc_fixture) assert timezones.is_utc(tz)