@@ -100,16 +100,16 @@ iNaT = NPY_NAT
100
100
101
101
102
102
from tslibs.timezones cimport (
103
- is_utc, is_tzlocal, _is_fixed_offset ,
103
+ is_utc, is_tzlocal, is_fixed_offset ,
104
104
treat_tz_as_dateutil, treat_tz_as_pytz,
105
105
get_timezone, get_utcoffset, maybe_get_tz,
106
- _get_dst_info
106
+ get_dst_info
107
107
)
108
108
from tslibs.timezones import ( # noqa
109
109
get_timezone, get_utcoffset, maybe_get_tz,
110
- _p_tz_cache_key , dst_cache,
111
- _unbox_utcoffsets ,
112
- _dateutil_gettz
110
+ p_tz_cache_key , dst_cache,
111
+ unbox_utcoffsets ,
112
+ dateutil_gettz
113
113
)
114
114
115
115
@@ -167,7 +167,7 @@ def ints_to_pydatetime(ndarray[int64_t] arr, tz=None, freq=None, box=False):
167
167
pandas_datetime_to_datetimestruct(
168
168
value, PANDAS_FR_ns, & dts)
169
169
result[i] = func_create(value, dts, tz, freq)
170
- elif is_tzlocal(tz) or _is_fixed_offset (tz):
170
+ elif is_tzlocal(tz) or is_fixed_offset (tz):
171
171
for i in range (n):
172
172
value = arr[i]
173
173
if value == NPY_NAT:
@@ -181,7 +181,7 @@ def ints_to_pydatetime(ndarray[int64_t] arr, tz=None, freq=None, box=False):
181
181
dt = Timestamp(dt)
182
182
result[i] = dt
183
183
else :
184
- trans, deltas, typ = _get_dst_info (tz)
184
+ trans, deltas, typ = get_dst_info (tz)
185
185
186
186
for i in range (n):
187
187
@@ -1641,12 +1641,12 @@ cdef inline void _localize_tso(_TSObject obj, object tz):
1641
1641
obj.tzinfo = tz
1642
1642
else :
1643
1643
# Adjust datetime64 timestamp, recompute datetimestruct
1644
- trans, deltas, typ = _get_dst_info (tz)
1644
+ trans, deltas, typ = get_dst_info (tz)
1645
1645
1646
1646
pos = trans.searchsorted(obj.value, side = ' right' ) - 1
1647
1647
1648
1648
# static/pytz/dateutil specific code
1649
- if _is_fixed_offset (tz):
1649
+ if is_fixed_offset (tz):
1650
1650
# statictzinfo
1651
1651
if len (deltas) > 0 and obj.value != NPY_NAT:
1652
1652
pandas_datetime_to_datetimestruct(obj.value + deltas[0 ],
@@ -4066,7 +4066,7 @@ def tz_convert(ndarray[int64_t] vals, object tz1, object tz2):
4066
4066
* 1000000000 )
4067
4067
utc_dates[i] = v - delta
4068
4068
else :
4069
- trans, deltas, typ = _get_dst_info (tz1)
4069
+ trans, deltas, typ = get_dst_info (tz1)
4070
4070
4071
4071
# all-NaT
4072
4072
tt = vals[vals!= NPY_NAT]
@@ -4108,7 +4108,7 @@ def tz_convert(ndarray[int64_t] vals, object tz1, object tz2):
4108
4108
return result
4109
4109
4110
4110
# Convert UTC to other timezone
4111
- trans, deltas, typ = _get_dst_info (tz2)
4111
+ trans, deltas, typ = get_dst_info (tz2)
4112
4112
4113
4113
# use first non-NaT element
4114
4114
# if all-NaT, return all-NaT
@@ -4172,7 +4172,7 @@ def tz_convert_single(int64_t val, object tz1, object tz2):
4172
4172
delta = int (get_utcoffset(tz1, dt).total_seconds()) * 1000000000
4173
4173
utc_date = val - delta
4174
4174
elif get_timezone(tz1) != ' UTC' :
4175
- trans, deltas, typ = _get_dst_info (tz1)
4175
+ trans, deltas, typ = get_dst_info (tz1)
4176
4176
pos = trans.searchsorted(val, side = ' right' ) - 1
4177
4177
if pos < 0 :
4178
4178
raise ValueError (' First time before start of DST info' )
@@ -4191,7 +4191,7 @@ def tz_convert_single(int64_t val, object tz1, object tz2):
4191
4191
return utc_date + delta
4192
4192
4193
4193
# Convert UTC to other timezone
4194
- trans, deltas, typ = _get_dst_info (tz2)
4194
+ trans, deltas, typ = get_dst_info (tz2)
4195
4195
4196
4196
pos = trans.searchsorted(utc_date, side = ' right' ) - 1
4197
4197
if pos < 0 :
@@ -4261,7 +4261,7 @@ def tz_localize_to_utc(ndarray[int64_t] vals, object tz, object ambiguous=None,
4261
4261
" Length of ambiguous bool-array must be the same size as vals" )
4262
4262
ambiguous_array = np.asarray(ambiguous)
4263
4263
4264
- trans, deltas, typ = _get_dst_info (tz)
4264
+ trans, deltas, typ = get_dst_info (tz)
4265
4265
4266
4266
tdata = < int64_t* > trans.data
4267
4267
ntrans = len (trans)
@@ -4967,7 +4967,7 @@ cdef _normalize_local(ndarray[int64_t] stamps, object tz):
4967
4967
result[i] = _normalized_stamp(& dts)
4968
4968
else :
4969
4969
# Adjust datetime64 timestamp, recompute datetimestruct
4970
- trans, deltas, typ = _get_dst_info (tz)
4970
+ trans, deltas, typ = get_dst_info (tz)
4971
4971
4972
4972
_pos = trans.searchsorted(stamps, side = ' right' ) - 1
4973
4973
if _pos.dtype != np.int64:
@@ -5022,7 +5022,7 @@ def dates_normalized(ndarray[int64_t] stamps, tz=None):
5022
5022
if (dt.hour + dt.minute + dt.second + dt.microsecond) > 0 :
5023
5023
return False
5024
5024
else :
5025
- trans, deltas, typ = _get_dst_info (tz)
5025
+ trans, deltas, typ = get_dst_info (tz)
5026
5026
5027
5027
for i in range (n):
5028
5028
# Adjust datetime64 timestamp, recompute datetimestruct
0 commit comments