Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix timezone in webhook embed #79

Closed
wants to merge 1 commit into from
Closed

Conversation

bl4ckswordsman
Copy link
Owner

@bl4ckswordsman bl4ckswordsman commented Nov 11, 2024

Fixes #78

Adjust the time in the "Last updated" footer of the Discord notification webhook's embed to the local timezone.

  • Add a function get_local_time to convert UTC time to local time using the datetime module.
  • Replace datetime.now(timezone.utc).isoformat() with get_local_time().isoformat() in handle_game_state_change.
  • Replace datetime.now(timezone.utc).isoformat() with get_local_time().isoformat() in handle_game_server_state_change.

For more details, open the Copilot Workspace session.

Fixes #78

Adjust the time in the "Last updated" footer of the Discord notification webhook's embed to the local timezone.

* Add a function `get_local_time` to convert UTC time to local time using the `datetime` module.
* Replace `datetime.now(timezone.utc).isoformat()` with `get_local_time().isoformat()` in `handle_game_state_change`.
* Replace `datetime.now(timezone.utc).isoformat()` with `get_local_time().isoformat()` in `handle_game_server_state_change`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/bl4ckswordsman/disco-beacon/issues/78?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
disco-beacon ⬜️ Ignored (Inspect) Visit Preview Nov 11, 2024 7:33pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix timezone in webhook embed
1 participant