mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
Document SimpleDateFormat not thread-safe
This commit is contained in:
parent
126cc9df70
commit
a7d1f09b5c
1 changed files with 1 additions and 0 deletions
|
@ -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"));
|
||||
|
|
Loading…
Reference in a new issue