Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RESTHandler: datetime strips time when TZ supplied

    SmartClient Version: v8.3p_2013-06-22/PowerEdition Deployment (built 2013-06-22)

    while testing the RESTHandler, I noticed that, during an add request, if I specify a datetime with a time zone offset, as specified in the docs ie "2006-01-10T12:22:04-04:00", the date is saved as '2006-01-10' only.
    And in my DMI which implements the add operation, actually the server side java.util.Date object has 00:00:00 time part.
    Last edited by claudiobosticco; 2 Jul 2013, 02:07.

    #2
    Does the same thing happen if you send a datetime without a timezone, or is it the presence of the TZ offset that causes it to record the date portion only?

    Comment


      #3
      it does happen *only* when a time zone offset is specified.

      Comment


        #4
        OK, we see this. A fix went in today, will be present in 8.3 and 9.0 builds as of tomorrow, 7/5.

        Comment


          #5
          SmartClient Version: v8.3p_2013-07-05/PowerEdition Deployment (built 2013-07-05)

          The problem is still there,
          I'm testing with dates in the format 2013-07-10T12:22:04+01:00
          and also 2013-07-10T12:22:04.000+01:00

          Comment


            #6
            We use Java SimpleDateFormat to parse the datetime, and for some reason it differs from the XML Schema standard. For that reason, the timezone portion must be of the form "-HHMM" (ie, no ":" in the middle). We did update the documentation to mention this, but forgot to make an explicit point of it on this thread - sorry about that.

            Note, we do not support the form that includes milliseconds at all - SmartClient datetimes only support resolution to the nearest second right now.

            Comment


              #7
              ok, so it's working, thank you very much.

              Comment


                #8
                now we're facing another problem, during a fetch: the RESTHandler returns dates without timezone. So the dates are 2 hours before actual datetime, incidentally, we're GMT+2, now.
                Is it possible to have datetime returned by resthandler with timezone?
                Last edited by claudiobosticco; 22 Aug 2013, 13:41.

                Comment


                  #9
                  RESTHandler delivers dates as UTC regardless of server timezone, as per RestDataSource docs.

                  Comment

                  Working...
                  X