I'm getting an Instant from DB1, that is supposed to be in UTC, and putting it in DB2. But the instant I'm getting is in DB1 local time. I have their timezone(ZoneId) but I can't figure out how to convert it to UTC before putting it in DB2
How to convert Instant not stored in UTC to UTC?
1.1k views Asked by mitchldtn At
1
An
Instant
is always in UTC, and never needs timezone conversion. If you tried to convert anInstant
to anInstant
in another timezone correctly, you would always get exactly the sameInstant
back.What you must have is a bug in how it's being stored, or how it's being displayed.