Skip to content

TypeError: can't subtract offset-naive and offset-aware datetimes #697

Description

@brunetton

Hi,

I'm working with offset-aware datetime objects and wanted to display them in a friendly way to the user.

Howto reproduce

from datetime import datetime
import human_readable
date = datetime.fromisoformat("2024-11-02T20:00:00+00:00")  # offset-aware datetime
human_readable.date_time(date)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions