Skip to content

Commit

Permalink
fix calendar.py to work at any day/time
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmelt committed Dec 16, 2024
1 parent 53c6fc5 commit 4fe70f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
) # => {"name":"Mine", "color":"#4287f5", "scope":"DEFAULT", "updated_at":1698763720728596964}

now = datetime.now(timezone.utc)
start = datetime(now.year, now.month, now.day, now.hour + 1, 30, 00, 00, timezone.utc)
start = now + timedelta(hours=1)
stop = start + timedelta(hours=1) # Stop plus 1hr
act = create_timeline_activity("Mine", kind="reserve", start=start, stop=stop)
print(act) # =>
Expand Down

0 comments on commit 4fe70f0

Please sign in to comment.