naive and aware constraints on datetime types
See original GitHub issueShould be fairly easy since speedate gives offset
as optional.
@antonagestam said he might be able to work on this, see https://github.com/pydantic/pydantic/discussions/3477#discussioncomment-3771452
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Why naïve times are local times in Python - Paul Ganssle
Since naïve datetimes originally represented "abstract" datetime objects, they have no UTC offset and both hash and equality is based only on ...
Read more >Allow specifying `datetime` (and `time`) to be aware or naive
The main question is that, what should we treat naive datetime objects as? Do they represent local time or utc time? Since datetime.astimezone...
Read more >How to pass a timezone format file to a naive datetime object ...
I made it work this way: lastDate = lastDate.replace(tzinfo=FirstDate.tzinfo) lastDate - FirstDate. Replacing only the tzinfo attribute on ...
Read more >What is the difference between naive and aware? - Educative.io
Types of datetime class. The datetime class is classified into two categories: Naive; Aware. If a datetime object has time zone information, then...
Read more >Datetime — System Development With Python 2.0 ...
two types of datetimes - naive and aware It's usually safer to be explicit. pytz is based on the Olson database, a reference...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just to be clear, speedate is part of the pydantic org, and I built it specifically for pydantic-core, so we can change it if required.
Totally agree, plan is to rewrite the documentation completely - on my long list of things to do.