Java simpledateformat time zone offset, minutes separated by colons

In Java, how to use simpledateformat to get "2012-11-25t23:50:56.193 01:00"? If I use Z format

"Yyyy mm dd't'hh: mm: SS. Sssz" – then displays

2013-03-06T11:49:05.490 0100

Solution

You can use simpledateformat (yyyy mm dd'thh: mm: SS. Sssxxx) in Java 7 or joda's datetimeformat (yyyy mm dd'thh) to obtain a time zone offset in a format such as 01:00: mm: SS SSSZZ).

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>