Start_timestamp

Dear PA Users and Support team,

I would like to know if downloaded PA data are in UTC or local time? The description about ‘start_timestamp’ and ‘start_timestamp’ is not clear w.r.t. it.

For example, UNIX time stamp: 1589772600 is Mon May 18 2020 03:30:00 GMT+0000 and Sun May 17 2020 19:30:00 GMT-0800 (Pacific Standard Time), so when we download the data from PA using this time stamp then in which date/time PA will return the data?

Thank you!

start_timestamp: The time stamp of the first required history entry. Query is executed using data_timestamp >= start_timestamp.
Time can be specified as a UNIX time stamp in seconds or an ISO 8601 string. ISO 8601 - Wikipedia.
The time_stamp column in the resulting JSON or CSV will be in the same format and or time zone that you use for this start_timestamp parameter.
If not specified, the last maximum time span for the requested average will be returned.|

end_timestamp: The end time stamp of the history to return. Query is executed using data_timestamp < end_timestamp.
Time can be specified as a UNIX time stamp in seconds or an ISO 8601 string. ISO 8601 - Wikipedia.
If not specified, the maximum time span will be returned starting from the provided start_timestamp.|

1 Like

Hello @Zuber_Farooqui ,

This post should be helpful: Convert UTC to local time

1 Like

Dear @Amanda_Hawkins ,

My question was similar/in line to the post API Correct Timestamp Get Sensors API Call and according to @Andrew, the data retried will be in local computer time.

Not to create more confusion, I still want to know UNIX time stamp = 1589772600 will return me data in UTC or my local computer timezone which is PDT?

Conversion from one timezone to another is not an issue.

Thank you!!

1 Like

I’ve corrected my comment. Data from the API is always returned in UTC. Sorry for the confusion!

I need to make another correction. Time from the API is returned in the form in which it was called. For example, if you use the timestamp 2023-06-08T16:38:33Z, the data will be returned in UTC, since you specified UTC with the “Z” in the timestamp. If you use the timestamp 2023-06-08T16:38:33Z-6:00, the data will be returned in UTC-6:00.

UNIX timestamps are always in UTC, so if you make a call using a UNIX timestamp, the data returned in the response will be in UTC.

My apologies for any confusion I may have caused with my previous statement.

2 Likes