MerginMaps / MerginMaps/geodiff
Timezone info is lost when applying diff from sqlite to postgres
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 183
- Forks
- 21
- Avg merge
- 9d 11h
- Merged PRs (30d)
- 2
Description
I have a table with DATETIME column type containing a value with timezone info. When doing a copy to postgres, the timezone info is lost - and mergin-db-sync reports that there is an issue in geodiff.
2022/11/04 02:50:27.305+02 -- original value in sqlite
2022-11-04 02:50:27.305 -- what gets stored in postgres (we're using "timestamp without time zone" type)
2022-11-04T02:50:27.305Z -- when we do copy back from postgres to sqlite
A workaround for now is not to use date/time values with timezone info.
Contributor guide
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.
Research direction
Reproduce the SQLite-to-Postgres copy using a DATETIME value with timezone information, then trace the geodiff path reported by mergin-db-sync. Compare the original SQLite value, the stored PostgreSQL value, and the value copied back to SQLite. Done means timezone information is handled consistently without triggering the reported geodiff issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100