Page 1 of 1

API General Update Request | Include TimeZone on all datetimes

Posted: Mon May 16, 2022 10:07 am
by rinse-dental
Would love to see timezone including on all dates, including DateTStamp, serverDateTime, and especially AptDateTime

Re: API General Update Request | Include TimeZone on all datetimes

Posted: Mon May 16, 2022 7:25 pm
by jordansparks
Including it in the date field seems like a breaking change. On the other hand, everyone is probably parsing the date with a library that could easily handle the change. Still, I think we'll need to make it an option that you intentionally turn on.

Re: API General Update Request | Include TimeZone on all datetimes

Posted: Thu May 19, 2022 9:48 am
by SLeon
The addition of time zone information has been added to our development list. The output string will be in "yyyy-MM-dd HH:mm:sszzz" format, and so will appear as "2022-05-19 09:42:45-07:00". Our plan is to toggle on the time zone information with a URL parameter. This will allow developers to opt into this new format and preserve existing behavior/prevent a breaking change.

Re: API General Update Request | Include TimeZone on all datetimes

Posted: Fri Jun 17, 2022 3:58 pm
by SLeon
In an effort to support many different type of DateTime formats, we have added a new URL parameter for API requests called DateTimeFormatString. This parameter is available for all API requests and will allow developers to fully customize the way all returned DateTimes (dates in "yyyy-MM-dd HH:mm:ss" format) are displayed.

The new DateTimeFormatString can be set to any format string found here https://docs.microsoft.com/. Common examples include:
  • Time Zones: yyyy-MM-dd HH:mm:ss zzz (2022-06-17 15:46:45 -7:00)
  • Day-Month-Year: dd-MM-yyyy HH:mm:ss (17/06/2022 15:46:45)
  • 12-Hour times: yyyy-MM-dd hh:mm:ss tt (2022-06-17 03:46:45 PM)
  • Long versions: dddd, MMMM d, yyyy HH:mm:ss (Friday, June 17, 2022 15:46:45)
  • Other separating characters: MM/dd/yy HH:mm:ss (06/17/22 15:46:45)
An example request would look like:

Code: Select all

GET /patients/Simple?DateTimeFormatString=dd/MM/yyyy HH:mm:ss zzz
Returning:

Code: Select all

{
"PatNum": 48,
"LName": "Smith",
"FName": "Jane",
...
"DateTStamp": "08/12/2021 15:34:34 -7:00"
}

Please see the section under DateTime Format on our API Implementation page. This will be available in our next beta version, 22.2.14, which is estimated to be released within the next week.