Skip to content

Commit 543257a

Browse files
committed
fixed doc-string; changed parameters order in 'create_tsobject_tz_using_offset' func
1 parent ce242f2 commit 543257a

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
@@ -393,9 +393,10 @@ cdef _TSObject convert_datetime_to_tsobject(datetime ts, object tz,
393393

394394

395395
cdef _TSObject create_tsobject_tz_using_offset(int64_t value,
396-
object tz, int tzoffset):
396+
int tzoffset, object tz=None):
397397
"""
398-
Create tsobject from numpy datetime64 using initial timezone offset
398+
Convert a numpy datetime64 `value`, along with initial timezone offset
399+
`tzoffset` to a _TSObject (with timezone object `tz` - optional).
399400
400401
Parameters
401402
----------
@@ -406,9 +407,8 @@ cdef _TSObject create_tsobject_tz_using_offset(int64_t value,
406407
tzoffset: int
407408
408409
Returns
409-
obj : _TSObject
410410
-------
411-
411+
obj : _TSObject
412412
"""
413413
cdef:
414414
_TSObject obj
@@ -489,8 +489,8 @@ cdef _TSObject convert_str_to_tsobject(object ts, object tz, object unit,
489489
check_dts_bounds(&dts)
490490
value = dtstruct_to_dt64(&dts)
491491
if out_local == 1:
492-
return create_tsobject_tz_using_offset(value, tz,
493-
out_tzoffset)
492+
return create_tsobject_tz_using_offset(value,
493+
out_tzoffset, tz)
494494
else:
495495
ts = value
496496
if tz is not None:

0 commit comments

Comments
 (0)