Formatting Timestamps in Java

前端 未结 4 1680
刺人心
刺人心 2020-12-11 00:12

Is there a way to format a UTC time into any arbitrary string format I want in java? Basically I was thinking of having some class take the timestamp and I pass it is strin

4条回答
  •  没有蜡笔的小新
    2020-12-11 00:43

    One gotcha to be aware of is that SimpleDateFormat is NOT thread-safe. Do not put it in a static field and use it from multiple threads concurrently.

提交回复
热议问题