OurchiveIO / ourchive

An easily installable fiction, audio, and image archive package.
GNU General Public License v3.0
7 stars 6 forks source link

datetime error #145

Open Sylphystia opened 2 months ago

Sylphystia commented 2 months ago

Describe the bug Getting a datetime/time zone support error.

To Reproduce Steps to reproduce the behavior:

  1. Load any page at all.
  2. See error in terminal. (No actual admin announcement active needed, the error pops up whatever there is one or not.)

Expected behavior No error?

Log RuntimeWarning: DateTimeField AdminAnnouncement.expires_on received a naive datetime (2024-05-22 16:47:56.154048) while time zone support is active.

Desktop (please complete the following information):

c-e-p commented 1 month ago

@Sylphystia Thank you for reporting this! The error itself is harmless - it's just saying we're parsing a datetime without specifying timezone - so probably can be ignored for now, but feel free to update this issue if you see wonky behavior. I can think of places where the behavior would get weird (when admin announcements expire, edge cases with UTC vs local time when manually modifying chive create/update dates) so this is medium priority for a fix.