scenario.timezoneutils module¶
Timezone handling.
- UTC¶
UTC timezone constant.
- local(ref_timestamp)¶
Returns the local timezone for the given timestamp.
- Parameters:
ref_timestamp – Reference timestamp to compute the local timezone for.
- Returns:
Local timezone (fixed time offset, non DST-aware).
Warning
The timezone returned is a fixed time offset, i.e. it does not handle DST (Daylight Saving Time) shifts.
That’s the reason why the
ref_timestamp
must be set appropriately in order to avoid errors between summer and winter times.
- fromstr(tz_desc)¶
Computes a timezone information from an optional string.
- Parameters:
tz_desc – Optional timezone description.
- Returns:
Timezone information when
tz_desc
is set,None
otherwise.