How to read "timestamp with time zone" from postgresql

30 views
Skip to first unread message

Sajan Soosaimicheal

unread,
Nov 13, 2021, 9:27:18 PM11/13/21
to Quarkus Development mailing list
Hello All, 
I am facing issue to display date time in UI. 

DB type: postgresql

DB column type: timestamp with time zone
DB column Value: 2021-11-02 22:16:16.108341-04
after read value from DB: 2021-11-02T22:16:16.108341-04:00
UI data: 2021-11-02T22:16:16.108341-04:00

Entity: 
private OffsetDateTime createdOn;

from UI we are not able to parse datetime value and display in UI. anyone able to hep me to fix date issue?

TIA.




Max Rydahl Andersen

unread,
Nov 14, 2021, 2:53:05 AM11/14/21
to Sajan Soosaimicheal, Quarkus Development mailing list

Hi Sajan,

This question is better asked on stackoverflow with hibernate / Quarkus tag. This list is for questions/discussions around development for Quarkus itself.

hint: don't store anything but UTC timestamps in your database. Tiemzone is a client side concern.

/max

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/4cc7fe07-30b5-4a34-95cb-6473738b7634n%40googlegroups.com.

Sajan Soosaimicheal

unread,
Nov 14, 2021, 3:29:42 PM11/14/21
to Max Rydahl Andersen, Quarkus Development mailing list
yeah sure thank max.
Reply all
Reply to author
Forward
0 new messages