Overview:
- UTC offset is the time difference between one place on the Earth and the UTC.
- The method utcoffset() returns the UTC offset for a timezone instance.
Example:
# Example Python program that prints the UTC offset # Create a timedelta with +9 hours as duration # Print the UTC offset oft = jst.utcoffset(None) # Japanese afternoon |
Output:
UTC offset from time zone: 9:00:00 <class 'datetime.timedelta'> Time: 01:00 PM JST |