java - SimpleDateFormat and TimeZone format -


i trying make simpledateformat class need without success.

here date format need:

fri 29 may 2015 10:22:30 gmt-0400 (eastern daylight time) 

here closest format definition able come with:

simpledateformat("eee dd mm yyyy hh:mm:ss z (zzzz)", locale.english) 

this output:

fri 29 may 2015 10:22:30 -0400 (eastern daylight time) 

is there formatting can need or have no other choice manipulating string insert missing gmt tag?

you can add literal gmt surrounded quotes:

new simpledateformat("eee dd mm yyyy hh:mm:ss 'gmt'z (zzzz)", locale.english); 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -