diff --git a/adafruit_datetime.py b/adafruit_datetime.py index ef57823..99e30a4 100755 --- a/adafruit_datetime.py +++ b/adafruit_datetime.py @@ -923,7 +923,7 @@ def __new__( microsecond: int = 0, tzinfo: Optional[tzinfo] = None, *, - fold: int = 0 + fold: int = 0, ) -> "time": _check_time_fields(hour, minute, second, microsecond, fold) _check_tzinfo_arg(tzinfo) @@ -994,6 +994,8 @@ def fromisoformat(cls, time_string: str) -> "time": Valid format is ``HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]`` """ + if time_string[-1] == "Z": + time_string = f"{time_string[:-1]}+00:00" # Store the original string in an error message original_string = time_string match = _re.match(r"(.*)[\-\+]", time_string) @@ -1254,7 +1256,7 @@ def __new__( microsecond: int = 0, tzinfo: Optional[tzinfo] = None, *, - fold: int = 0 + fold: int = 0, ) -> "datetime": _check_date_fields(year, month, day) _check_time_fields(hour, minute, second, microsecond, fold) @@ -1599,7 +1601,7 @@ def replace( microsecond: Optional[str] = None, tzinfo: bool = True, *, - fold: Optional[int] = None + fold: Optional[int] = None, ) -> "datetime": """Return a datetime with the same attributes, except for those attributes given new values by
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: