You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Shellman, Joel" <Jo...@Summit.Fiserv.com> on 2003/07/07 22:56:05 UTC
Timezone in Date passed in to web service
Why is the timezone converted when a date is passed in to a web service?
So if I have a service method:
void myMethod(Calendar myCal) {...}
If I send in 2003-06-30T00:00:00.0-05:00 to that myCal parameter and then
print out myCal in the java code, the timezone is based on whatever the
server is running at (which is -7:00 instead of -5:00). Isn't that wrong?
Shouldn't it preserve the timezone as passed in instead of losing it? Is
there a way to make it so it does preserve the timezone or do I have to
change it to a string?
Primary reason for this is I need a date mm/dd/yyyy and that's what matters.
The server losing the timezone information causes that date to be different
than what the user entered.
Thanks,
-joel
Re: Timezone in Date passed in to web service
Posted by Jens Schumann <je...@void.fm>.
On 7/7/03 11:08 PM Jens Schumann <je...@void.fm> wrote:
> On 7/7/03 10:56 PM Shellman, Joel <Jo...@Summit.Fiserv.com> wrote:
>
>> Why is the timezone converted when a date is passed in to a web service?
>
> Axis is using "Zulu" time for serialization and deserializes datetimes
> according to http://www.w3.org/TR/xmlschema-2/#dateTime.
I forgot to mention that after Deserialization the timezone is GMT, if I
remember correctly.
Re: Timezone in Date passed in to web service
Posted by Jens Schumann <je...@void.fm>.
On 7/7/03 10:56 PM Shellman, Joel <Jo...@Summit.Fiserv.com> wrote:
> Why is the timezone converted when a date is passed in to a web service?
Axis is using "Zulu" time for serialization and deserializes datetimes
according to http://www.w3.org/TR/xmlschema-2/#dateTime.
Jens