Parsing a string into a proper Java Date

J

Jbjones

I am not sure what the best way to parse a Z formatted time (GMT) into
my format. Here is an example date string and the parse string I would
like to smehow use:

String to parse: 2004-10-21T20:00:00-04:00
Format string to use:
new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");

I am not sure if i need to change my time zone from Eastern to GMT to
process then change it back, or what to do. That offset number is the
proper amount to go from GMT(Z) to EDT. Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top