Skip to content

Commit 030ffa0

Browse files
committed
fixed doc-string; changed parameters order in 'create_tsobject_tz_using_offset' func
1 parent 65c41bc commit 030ffa0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/_libs/tslibs/conversion.pyx

+6-6
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,10 @@ cdef _TSObject convert_datetime_to_tsobject(datetime ts, object tz,
394394

395395

396396
cdef _TSObject create_tsobject_tz_using_offset(int64_t value,
397-
object tz, int tzoffset):
397+
int tzoffset, object tz=None):
398398
"""
399-
Create tsobject from numpy datetime64 using initial timezone offset
399+
Convert a numpy datetime64 `value`, along with initial timezone offset
400+
`tzoffset` to a _TSObject (with timezone object `tz` - optional).
400401
401402
Parameters
402403
----------
@@ -407,9 +408,8 @@ cdef _TSObject create_tsobject_tz_using_offset(int64_t value,
407408
tzoffset: int
408409
409410
Returns
410-
obj : _TSObject
411411
-------
412-
412+
obj : _TSObject
413413
"""
414414
cdef:
415415
_TSObject obj
@@ -490,8 +490,8 @@ cdef _TSObject convert_str_to_tsobject(object ts, object tz, object unit,
490490
check_dts_bounds(&dts)
491491
value = dtstruct_to_dt64(&dts)
492492
if out_local == 1:
493-
return create_tsobject_tz_using_offset(value, tz,
494-
out_tzoffset)
493+
return create_tsobject_tz_using_offset(value,
494+
out_tzoffset, tz)
495495
else:
496496
ts = value
497497
if tz is not None:

0 commit comments

Comments
 (0)