@@ -482,7 +482,7 @@ cdef _TSObject convert_str_to_tsobject(object ts, object tz, object unit,
482
482
cdef inline check_overflows(_TSObject obj):
483
483
"""
484
484
Check that we haven't silently overflowed in timezone conversion
485
-
485
+
486
486
Parameters
487
487
----------
488
488
obj : _TSObject
@@ -577,8 +577,6 @@ cdef inline datetime _localize_pydatetime(datetime dt, tzinfo tz):
577
577
except AttributeError :
578
578
return dt.replace(tzinfo = tz)
579
579
580
- # ----------------------------------------------------------------------
581
- # Timezone Conversion
582
580
583
581
cpdef inline datetime localize_pydatetime(datetime dt, object tz):
584
582
"""
@@ -607,6 +605,9 @@ cpdef inline datetime localize_pydatetime(datetime dt, object tz):
607
605
return dt.replace(tzinfo = tz)
608
606
609
607
608
+ # ----------------------------------------------------------------------
609
+ # Timezone Conversion
610
+
610
611
cdef inline int64_t tz_convert_tzlocal_to_utc(int64_t val, tzinfo tz):
611
612
"""
612
613
Parameters
@@ -682,10 +683,8 @@ cpdef int64_t tz_convert_single(int64_t val, object tz1, object tz2):
682
683
683
684
Returns
684
685
-------
685
- int64 converted
686
-
686
+ converted: int64
687
687
"""
688
-
689
688
cdef:
690
689
ndarray[int64_t] trans, deltas
691
690
Py_ssize_t pos
@@ -840,9 +839,17 @@ def tz_localize_to_utc(ndarray[int64_t] vals, object tz, object ambiguous=None,
840
839
Localize tzinfo-naive i8 to given time zone (using pytz). If
841
840
there are ambiguities in the values, raise AmbiguousTimeError.
842
841
842
+ Parameters
843
+ ----------
844
+ vals : ndarray[int64_t]
845
+ tz : tzinfo or None
846
+ ambiguous : str, bool, or arraylike
847
+ If arraylike, must have the same length as vals
848
+ errors : {"raise", "coerce"}, default "raise"
849
+
843
850
Returns
844
851
-------
845
- localized : DatetimeIndex
852
+ localized : ndarray[int64_t]
846
853
"""
847
854
cdef:
848
855
ndarray[int64_t] trans, deltas, idx_shifted
0 commit comments