Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I 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): PS: timestamp works 😎

Any idea or suggestion will be super appreciated!!!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

ArsenyYankovskycommented, Mar 25, 2021

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.

ArsenyYankovskycommented, Apr 2, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TIMESTAMPTZ converts TIMESTAMP values from UTC to the client's session time zone (unless another time zone is specified for the value).
Read more >
Documentation: 15: 8.5. Date/Time Types - PostgreSQL
timestamptz is accepted as an abbreviation for timestamp with time zone ; this is a PostgreSQL extension. time , timestamp , and interval...
Read more >
Stores the specified date and time. TIMESTAMPTZ is the same as TIMESTAMP WITH TIME ZONE : both data types store the UTC offset...
Read more >
Understanding PostgreSQL Timestamp Data Types
The timestamptz datatype is the timestamp with the time zone. The timestamptz datatype is a time zone-aware date and time data type.
Read more >
TIMESTAMPTZ (Oracle Database JDBC Java API Reference)
the java.sql.Time object represented by Oracle TIMESTAMPTZ object. Only the hour, minute and seconds are contained in the java.sql.Time object that is returned ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found