79625398

Date: 2025-05-16 14:36:21
Score: 1
Natty:
Report link

The issue was simple. The code ordered by the timestamp, but the timestamp only had seconds of resolution.

When generating the timestamps, switching from the custom format string to isoformat:

def get_utc_timestamp_now() -> str:
    # timestamp in a format where alphabetical order is also chronological order
    return datetime.datetime.now(datetime.timezone.utc).isoformat()
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Marc