java - How to keep date info? -
in java, want know best practice keep date info display, query, report etc. seems if persist long, timezone dependency removed , keep 'persist globally, display locally' principle since date object automatically converts long current timezone.
but advantage of persisting date object?
loose info other info owner's timezone?
can wrong info when dls takes account?
difference between persisting utc date , long readable db info?
depending on database should use either timestamp timezone
or convert utc
time , store long
.
the first 1 relies on db handle correctly (the db will, db driver? have test setup). second 1 makes manual process, correct result in end have more hazzle because have take care everything.
inside java might want use calendar
on date
because there can specify timezone
etc. manually, able display dates in timezones different own easier.
Comments
Post a Comment