Method Name:
timezone
Method Signature:
timezone()
Parameters:
utcOffset - A timedelta instance. The timedelta instance can not represent more than -24 hours or +24 hours.
name - name of the time zone. No validation is done by the timezone class. A string value to name the time zone.
Return Value:
A timezone instance.
Overview:
- A timezone instance can be created by calling the constructor timezone() with the arguments UTCOffset and a name representing the time zone.
Example:
# Example Python program that creates a timezone instance # Difference from UTC in Seconds for Pacific Standard Time Zone # Create a timedelta # Create a timezone instance for PST |
Output:
Time in San Francisco when DST is not observed: 10:30:00-08:00 PST |