Question I was asked today, which I thought was simple: “How do I convert a java.time.Instant to UTC?”
java.time.Instant
A Java server I wrote was storing date/time values in MySQL incorrectly during the transition from Daylight Saving Time to Standard Time. The solution was to force MySQL to store everything in Coordinated Universal Time (UTC).
If you persistently store an instant in time (aka a timestamp), then that instant must be stored in Coordinated Universal Time (UTC)*.