timestamptz
See original GitHub issueI have several columns that use timestamptz, however TypeORM (or the driver or AWS - I really don’t know) returns the value without the ‘Z’ that represents the correct timezone. The value is treated as a string type and not as a Date type (normal behaviour) due to (I guess) parsing problems.
PLEASE SEE this issue from local-data-api for more information:
Me and @koxudaxi are trying to investigate but we need more help…
I’ve made a test repo to try the strange (error???) behaviour. You can find it here.
After hours of trial and error I’ve finally discovered another issue (sorry 😅😅😅) that is a little “bit dangerous” since has not been discovered even in the older versions (pre 0.6). The value of
timestamptz (timestamp with timezone)
(See this) is trimmed after 3 digits (of the ms) removing the ‘Z’ of the timezone. In javascript trying to parse the value without the ‘Z’ results in a ‘string’ type rather than a ‘Date’ type. However this causes undefined behaviour or parsing exceptions in other languages. NB: This problem affect both working and not working versions of docker compose. I’ve updated the with a new testing procedures (not only for timestamptz): https://github.com/carlocorradini/local-data-api-issue PS: timestamp works 😎
Any idea or suggestion will be super appreciated!!!
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (6 by maintainers)
Top GitHub Comments
The warning is coming from the TypeORM code, so nothing I can do there. The timestamptz timezone is remove so the original code was correct it seems. You can still use the 2.0.1 then to get a correct result. I will make proper fixes and add test cases based on data api documentation later this week when I have time.
You don’t have to use my fork anymore since new TypeORM 0.3.32 was released. Feel free to comment here or open a new issue if something doesn’t work.