Skip to content

Commit

Permalink
Update google calendar create_event api to correctly parse start/end_…
Browse files Browse the repository at this point in the history
…datetime (#13132)
  • Loading branch information
chenrui333 committed Apr 26, 2024
1 parent 053e6b4 commit 9859599
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ def create_event(
for attendee in attendees:
attendees_list.append({"email": attendee})
start_time = (
datetime.datetime.strptime(start_datetime, "%Y-%m-%dT%H:%M:%S")
datetime.datetime.strptime(start_datetime, "%Y-%m-%dT%H:%M:%S%z")
.astimezone()
.strftime("%Y-%m-%dT%H:%M:%S.%f%z")
)
end_time = (
datetime.datetime.strptime(end_datetime, "%Y-%m-%dT%H:%M:%S")
datetime.datetime.strptime(end_datetime, "%Y-%m-%dT%H:%M:%S%z")
.astimezone()
.strftime("%Y-%m-%dT%H:%M:%S.%f%z")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ license = "MIT"
maintainers = ["ajhofmann"]
name = "llama-index-tools-google"
readme = "README.md"
version = "0.1.3"
version = "0.1.4"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
Expand Down

0 comments on commit 9859599

Please sign in to comment.