Hello Adam
Yes you are right, and in the response, you get the timestamp in UTC and you convert it to local time. Although, I tried adding time zone offset in the request URL and it seems AA does support time zone offset
(https://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()), but the request always fail with code 404 because
it is unable to parse the time stamp with time zone offset.
P.S.: If you request data with the “getData.csv” and “getData.json” requests you get time stamp in UTC but for some reason “getData.txt” returns local time.
Best Regards,
Abdalla.
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of
Manoussakis, Adamandios via Tech-talk
Sent: Tuesday, November 15, 2022 10:38 PM
To: Ralph Lange <ralph.lange at gmx.de>; EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: RE: Epics Archiver Appliance requests and DST/Timezones
Hi Abdalla/Ralph,
Thanks for the responses and sorry for my naïve questions as this has been confusing for me.
Ralph just to clarify the part about “clients should formulate their requests in UTC”, that means that I do need to account for the proper offset based off my time zone (and DST) to get the proper UTC timestamp correct for the URL request?
I think that matches what Abdalla had mentioned about the client application grabbing the offset as well.
Example
If I have a PV that is stored at 10am PST, the IOC time stamp stores it at UTC but it has to get the offset from the system clock to go from PST to UTC right (-8 in this case to get to UTC)? Now if I want to get the PV in the archiver
that was stored at 10am PST, it seems I have two choices I either request it in UTC (had to add in the offset 10am + 8) 2012-012-27T18:00:00.000-000Z or have the offset in the request 2012-012-27T10:00:00.000-800Z.
But either way it looks like I need to account timezone/dst for the request, unless I am misunderstanding something horribly.
Thanks,
Adam
I agree with Abdalla.
IOC timestamps are UTC (= no timezone, no DST). The archive engine puts those IOC timestamps into the archive, without changing them.
Clients should formulate their requests in UTC. The returned data will have the UTC timestamps from the archive.
In other words: The times are in UTC; any conversion to local time needs to happen at the client.