pagination of records with datetimes does not include timezone (UTC) Z letter
See original GitHub issueMy DB stores “datetime without timezone”. When I do a query without the pagination librayr and serialize to pydantic models via parse_obj_as
, the daettime string generated includes Z
at the end. If I use the same query but use paginate(session, query)
, the paged results do not specify a timezone at the end.
I’m on fastapi-pagination v0.9.1
Issue Analytics
- State:
- Created 9 months ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Why does datetime.datetime.utcnow() not contain timezone ...
So, datetime.utcnow() doesn't set tzinfo to indicate that it is UTC, ... I tend to agree that calls to utcnow should include the...
Read more >Modify date and time formats in Zaps - Zapier Help
Modify date and time formats in Zaps · 1. Add a Formatter step · 2. Customize your date and time options · 3....
Read more >DateTime | Generic pass - Google Developers
The date/time will be adjusted based on the user's time zone. For example, a time of 2018-06-19T18:30:00-04:00 will be 18:30:00 for a user...
Read more >Z designator (designating UTC) results in errors #133 - GitHub
This type is unaware of time zones and does not provide a way to access calendar/clock units like month or hour. It's just...
Read more >Pagination | Cornerstone API
Pagination. The Employee/OU API's GET endpoints segment large results of data into pages. You can control the page size, i.e. the number of...
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 FreeTop 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
Top GitHub Comments
OK great this worked, thanks so much. I had to be sure to set the encoder up before I imported anything else with fastapi that defined routes (not simply before creating the FastAPI app instance. I have my routes defined in a separate routes file that had to be considered here.
Sorry, it is difficult to provide a sanitized example at the moment.