Creating a primary record via Web Service API produces unexpected date/time values

I asked this question to support and was told I should try here.

We are creating primary items using the web service API. One of the fields in these records is a date/time field. After performing the injection and pulling up the item in SBM, the time is off by 4 hours (Which is the offset set in our Locale in SBM Administrator). I know that all dates are stored in the database as GMT and the locale information is applied when viewing the dates and times in the user interface.

I've come up with a solution that works, but isn't ideal. From my external application, I send the date to a text field formatted as it would appear in the SBM date field (MM/DD/YYYY HH:mm:SS). After the submit, I have a pre-state AppScript action that assigns the value of the text field to the date field so long as it is indeed a date. Since we're not writing directly to the database, the proper date and time is saved and later displayed in the web interface.

Has anyone else worked with a problem like this before? Thanks.

  • Jason,

    In the Web Services api guide there is a section called "Supported Date/Time Formats" with some examples of using an offset. You might experiment with some of the options to see if it gives you better results. I was using this format "2006-04-28T13:20:00-7:00" which offsets the value by 7. Our offset is actually 8 but not sure with daylight savings etc. how that works but 7 seem to give the result I was looking for.