timestamp_encode() raises an Exception when encoding timezone-aware datetimes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 50/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- postgresql
- Domain
- databases
Research direction
Start at timestamp_encode() and inspect how pg_epoch_datetime and pg_epoch_datetime_utc are used when subtracting from timezone-aware datetimes. Confirm the fix by exercising timezone-aware input and verifying that encoding completes without the naive-versus-aware datetime exception.
Written by the indexing model from the issue text.
Description
When passing a timezone-aware datetime to timestamp_encode() an exception is raised when subtracting pg_epoch_datetime as is it timezone-naive.
I believe that in this case pg_epoch_datetime_utc should be subtracted instead.
- Dominant language
- Cython
- Stars
- 38
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MagicStack/py-pgproto
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
MagicStack/py-pgproto#31 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
MagicStack/py-pgproto#24 · 1 comment ·
-
Tiny fix in hton.h Open
Difficulty 1/5 Under an hour Newbie friendliness 48/100
MagicStack/py-pgproto#6 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MagicStack/py-pgproto#5 · 1 comment ·
All issues in MagicStack/py-pgproto
Similar issues
-
[Documentation Request] vLLM kv_load_failure_policy doesn't apply to load failures in L2 adapters Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
DATABASE_URL=pglite:memory: creates a directory named 'memory:' instead of an in-memory database Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BuilderIO/agent-native#5730 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
duckdb/duckdb-wasm#2258 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
supabase/agent-skills#602 ·