2 ms·
In Java it's worse, for SimpleDateFormat (the most often used date formatter in Java) YYYY (uppercase) is "week year" (strftime %G), the correct way to get the
by cesarb 6y ago
In Java it's worse, for SimpleDateFormat (the most often used date formatter in Java) YYYY (uppercase) is "week year" (strftime %G), the correct way to get the year (strftime %Y) is yyyy (lowercase). It's very easy to get it wrong; the correct way to get the full ISO timestamp is "yyyy-MM-dd'T'HH:mm:ss.SSSXXX".