@@ -595,7 +595,23 @@ class NaTType(_NaT):
595
595
utctimetuple = _make_error_func(
596
596
" utctimetuple" ,
597
597
"""
598
- Return UTC time tuple, compatible with time.localtime().
598
+ Return UTC time tuple, compatible with `time.localtime()`.
599
+
600
+ This method converts the Timestamp to UTC and returns a time tuple
601
+ containing 9 components: year, month, day, hour, minute, second,
602
+ weekday, day of year, and DST flag. This is particularly useful for
603
+ converting a Timestamp to a format compatible with time module functions.
604
+
605
+ Returns
606
+ -------
607
+ time.struct_time
608
+ A time.struct_time object representing the UTC time.
609
+
610
+ See Also
611
+ --------
612
+ datetime.datetime.utctimetuple : Return UTC time tuple, compatible with time.localtime().
613
+ Timestamp.timetuple : Return time tuple of local time.
614
+ time.struct_time : Time tuple structure used by time functions.
599
615
600
616
Examples
601
617
--------
@@ -612,6 +628,21 @@ class NaTType(_NaT):
612
628
"""
613
629
Return utc offset.
614
630
631
+ This method returns the difference between UTC and the local time
632
+ as a `timedelta` object. It is useful for understanding the time
633
+ difference between the current timezone and UTC.
634
+
635
+ Returns
636
+ --------
637
+ timedelta
638
+ The difference between UTC and the local time as a `timedelta` object.
639
+
640
+ See Also
641
+ --------
642
+ datetime.datetime.utcoffset : Standard library method to get the UTC offset of a datetime object.
643
+ Timestamp.tzname : Return the name of the timezone.
644
+ Timestamp.dst : Return the daylight saving time (DST) adjustment.
645
+
615
646
Examples
616
647
--------
617
648
>>> ts = pd.Timestamp('2023-01-01 10:00:00', tz='Europe/Brussels')
0 commit comments