web services - Different date format in Rest WS response in java -
i have 2 soap , rest webservices both has field called createddate. getting date db , setting date field of java class. there 2 different output object each service. when access these services soap ui, getting different format of time.
from soap: 2014-06-02t03:05:34-05:00 rest: 2014-06-02t08:05:34z
both same time coming same db cell. format different. using cxf both ws spring. want both in first format.
thanks
but format different.
not really. they're both using date/time format in rfc 3339 / iso-8601, per w3c xml schema recommendation, expresses offset utc local date/time. z
used utc offset of 0.
those different values in terms of time zone offset, represent same instant in time. 1 representation expresses in utc, in time zone 5 hours behind utc @ instant. (contrary terminology used in various standards, "-05:00" doesn't identify time zone; only shows offset utc @ instant. "real" time zone function utc instant local time @ instant.)
Comments
Post a Comment