2 Replies Latest reply on Sep 15, 2006 7:09 PM by Alessio Soldano

    Hour added to time between client and server

    Chris Baxter Newbie

      I have a webservice that returns an object that contains a java.util.Date property. That property is represented as a dateTime type in my WSDL. It seems that whenever I transfer an instance of that object between my client and server that an hour is added to the time component of the Date for no apparent reason. The client and server are on the same machine and thus are in the same timezone, so that should not be the issue. Does anyone know why this may be happening?

        • 1. Re: Hour added to time between client and server
          pomelo verde Newbie

          Even if you have the same TimeZone in your different running instances of the JVM, generally the TimeZone is set by default to a specifc TimeZone, and not to the operating system TimeZone set. If you save and retrieve date/time values from a database, the TimeZone in database could be (and often will be) different, so you obtain unexpected values loading and saving.

          Best regards.

          • 2. Re: Hour added to time between client and server
            Alessio Soldano Newbie

            We also had some problems with dates and managed to solve them all changing all Date into Calendar (both of them are mapped to dateTime in wsdl). When using Calendar you should always be able to receive and parse the TimeZone, that is not specified in soap messages if you don't use Calendar (at least as far as I remember, in jbossws 1.0.1). JBossWS will eventually convert you time to UTC but it will tell you that it's using that TimeZone, so you shouldn't have any problems this way.

            Alessio Soldano