mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-27 08:21:33 +00:00
Timezone offset should also accepts float
This commit is contained in:
@@ -8,12 +8,12 @@ class Timing:
|
|||||||
Handles timestamp formatting with timezone support.
|
Handles timestamp formatting with timezone support.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, timezone_offset: Optional[int] = None) -> None:
|
def __init__(self, timezone_offset: Optional[Union[int, float]] = None) -> None:
|
||||||
"""
|
"""
|
||||||
Initialize Timing object.
|
Initialize Timing object.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
timezone_offset (Optional[int]): Hours offset from UTC. Defaults to None (auto-detect).
|
timezone_offset (Optional[Union[int, float]]): Hours offset from UTC. Defaults to None (auto-detect).
|
||||||
"""
|
"""
|
||||||
self.timezone_offset = timezone_offset
|
self.timezone_offset = timezone_offset
|
||||||
|
|
||||||
@@ -40,12 +40,12 @@ class TimeZone(tzinfo):
|
|||||||
Custom timezone class with fixed offset.
|
Custom timezone class with fixed offset.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, offset: int) -> None:
|
def __init__(self, offset: Union[int, float]) -> None:
|
||||||
"""
|
"""
|
||||||
Initialize TimeZone object.
|
Initialize TimeZone object.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
offset (int): Hours offset from UTC
|
offset (Union[int, float]): Hours offset from UTC
|
||||||
"""
|
"""
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user