I am receiving a date as part of a webservice request as 2014-11-04T06:03:50-07:00. This seems to be in Pacific Time and I wanted to convert to eastern time. How could I do it using Java? I dont have control of how the data is formatted from the client side. Many Thanks.
Asked
Active
Viewed 342 times
0
-
Have a look at joda-time : http://www.joda.org/joda-time/ – phtrivier Nov 05 '14 at 15:43
-
2What do you then want to *do* with it in Eastern time? There are various different options depending on what you're doing with the data. Note that `2014-11-04T06:03:50-07:00` isn't so much "Pacific Time" as "UTC-7"... in other words, the value includes the UTC offset itself, so you don't need to assume a particular time zone. – Jon Skeet Nov 05 '14 at 15:44
-
we have to do a reconciliation report and the date to which we report is EST as we are in Eastern Time Zone. But here the client in the cloud sends date/time as PST. I want to log the data coming in as Eastern so I can compare. – hpandalai Nov 05 '14 at 16:07
-
This question is similar to http://stackoverflow.com/questions/26672773/format-a-date-string-java . Maybe my answer can help you. – Tobías Nov 05 '14 at 17:33