This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Mar 21, 2014, 3:31 PM
5 Posts

Domino Data Services REST Post DateFormat

  • Category: Domino Server
  • Platform: Linux
  • Release: 9.0.1
  • Role: Developer
  • Tags: Rest,DDS
  • Replies: 4

I am trying Domino Data Services to post data into an NSF (using Jackson). Unfortunately I am having some issues

- Posting data through the REST interface ignores my parameters (and the created document does not have a field named Form)

- date formats are broken (I work in Germany so it could be related to some locale settings)

SQL data example: Fri Apr 11 08:00:00 CEST 2014

formatted Date String for the Json data: 2014-04-11T08:00:00Z

I am using the strongtype format: "StartDate":{"data":"2014-04-11T08:00:00Z", "type":"datetime"}

This is what is posted in the Notes database: Field Name: StartDate, Data Type: Time/Date,  04.11.2014 08:00:00 GMT

Reading data through DDS works fine (date values are fine too).

I am a bit clueless now. Has anybody tried the DDS interface for posting data with dates to Domino?

This is an url example

http://localhost:80/pathtodb.nsf/api/data/documents?form=formaliasname&computewithform=true&parentid=AUNIDTWITHALENGTHOF32CHARS

 

Henning

Mar 21, 2014, 7:09 PM
19 Posts
What is the problem with the date/time?
Your JSON request included this:  "StartDate":{"data":"2014-04-11T08:00:00Z", "type":"datetime"}.  The Z at the end of the ISO8601 date/time says to use UTC.  In Notes this appears as "04.11.2014 08:00:00 GMT".  That looks right to me.  What exactly is wrong with the result?

And regarding the first part of the question, I don't know why the data service would ignore the form parameter.  Your URL format looks correct to me.

Thanks.

-- Dave Delay
Mar 21, 2014, 9:58 PM
5 Posts
Day and month are interchanged

Hello Dave, 

 

thank you for taking the time to look at my problem. The date seems to be wrong because in the Notes database month and day are interchanged (Nov. 04.11. 2014 instead of Apr. 11.04.2014). The german date format is dd.MM.YYYY HH:mm

The specification says I should use yyyy-MM-ddTHH:mm:ssZ and so I did. I will do some further tests with a more simple form and will check if a Domino server on Windows behaves differently.

 

Henning

Mar 23, 2014, 8:29 PM
19 Posts
yyyy-MM-ddTHH:mm:ssZ is the correct format ...
Henning,

I'm fairly confident the data service is parsing the date correctly.  

Assuming the stored date really is in the month of April, it's possible Notes isn't using the German locale when it displays "04.11.2014 08:00:00 GMT".  Is that how it is displayed in the Document Properties box?  Does Document Properties render other dates in the correct locale?

Thanks.

-- Dave
Mar 23, 2014, 10:08 PM
5 Posts
Locale properties

Hello Dave, 

 

yes, other dates are displayed correct (but those are created in the Notes client). It could very well be a locale issue unfortunately the documentation says nothing about locale settings for DDS (and changing them). The server also hosts some XPage applications and dates are correctly displayed. The value is directly taken from the Documents property box. It is not a big deal. For the moment I will just use Domino Data Services only for displaying data (which works fine).  Thank you again.

Henning


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal