Getting UTC Timestamp For Logging In MySQL

Two things:

  1. Leave off the ‘z’ or ‘Z’ from the formatting and see what happens when you insert.
  2. MySQL has only recently started support millisecond resolution on the timestamps, using a datatype that we don’t currently support.
  3. You’re entering a whole world of complexity here, and things can vary depending on the JDBC driver, the database, whether they are running on the same machines, in the same timezones or not, etc… Ultimately it’s up to you to understand this and make sure you are storing and retrieving data in a consistent manner…

But for now, just try inserting the timestamp having formatted it correctly :slight_smile: