1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 14:22:05 +01:00

Document SimpleDateFormat not thread-safe

This commit is contained in:
Paul Schaub 2022-03-07 10:26:24 +01:00
parent 126cc9df70
commit a7d1f09b5c
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -15,6 +15,7 @@ public final class DateUtil {
}
// Java's SimpleDateFormat is not thread-safe, therefore we return a new instance on every invocation.
public static SimpleDateFormat getParser() {
SimpleDateFormat parser = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z");
parser.setTimeZone(TimeZone.getTimeZone("UTC"));