Skip to content

Commit

Permalink
chore: fix the malfunction so the tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmilsonRodrigues committed Dec 17, 2024
1 parent 8116a97 commit de77229
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion juju/client/gocookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ def py_to_go_cookie(py_cookie):


def generate_rfc3339_from_unix_time(unix_time: datetime.datetime) -> str:
rfc, discard = unix_time.isoformat().split(".")
splitted_rfc = unix_time.isoformat().split(".")
if len(splitted_rfc) == 1:
return f"{splitted_rfc[0]}Z"
rfc, discard = splitted_rfc
discard = discard.split("+")
if len(discard) > 1:
rfc = datetime.datetime.fromisoformat(rfc)
Expand Down

0 comments on commit de77229

Please sign in to comment.