Expand my Community achievements bar.

WF API: Attask API returns invalid date and time of project field

Avatar

Level 1
Hi, When we pull the data from WF through Attask api and it returns wrong value of Date & Time(DTTM) type of WF field. It seems that WF applies timezone conversion while we pull the data from WF it converts the date and time value. However, not sure what type of timezone conversion applied and We pull the Please refer the below data: User entered date & time value in WF application: 6/20/19 5:15 AM User set Timezone in WF application: Mountain Standard Time (US & Canada) Attask API response: 6/19/2019 5:45:00 PM API Url: "https://Hive9.my.workfront.com/attask/api/proj/search?id=5cfe5ce30312e06f790febb2ba3ede21&fields=*,parameterValues,owner:title,status,DE:Tactic">https://Company.my.workfront.com/attask/api/v10.0/proj/search?id=abcde&fields= DE:Test_Date_Field In above example, we pull the "DE:Test_Date_Field" custom form value which is attached with project(id: abcde). When we hit the same above API URL on browser(Mozilla), we got the correct date and time value i.e. 6/20/19 5:15 AM. User already authenticated through login workfront application in browser and then hit the API URL in new tab of browser to get the response of that API request. So, my question is why we didn't get the same date and time value set at workfront application in Attask API response. Would you please help me to get the correct value. If timezone conversion apply then why it didn't apply when hit the API Url from browser. Nishank Modi
1 Reply

Avatar

Level 10
Hi, Check the timezone which is set on the user account you are using to access the API (i.e. the account which you got the API key from). The dates/times shown are based on the timezone of that user. Regards, David Cornwell