EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Epics Archiver Appliance requests and DST/Timezones
From: Pete Jemian via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Tue, 15 Nov 2022 21:35:20 -0600
FWIW in Python, a "timestamp" (such as obtained from time.time()) is in UTC relative to the epoch.
A local time (including timezone and DST) is obtained from datetime.datetime.now() or other package methods.
The datetime package includes methods which convert back and forth with timestamps.

See the documentation for the details.

https://docs.python.org/3/library/datetime.html
https://docs.python.org/3/library/time.html

Pete


On 11/15/2022 1:37 PM, Manoussakis, Adamandios via Tech-talk wrote:
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-27*T18:00:00.000-000Z *or have the offset in the request 2012-012-27*T10: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

*From:* Tech-talk <tech-talk-bounces at aps.anl.gov> *On Behalf Of *Ralph Lange via Tech-talk
*Sent:* Tuesday, November 15, 2022 1:29 AM
*To:* EPICS Tech Talk <tech-talk at aps.anl.gov>
*Subject:* Re: Epics Archiver Appliance requests and DST/Timezones

I agree with Abdalla.

The idea is:

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.

Cheers,
~Ralph


--
----------------------------------------------------------
Pete R. Jemian, Ph.D.                 <jemian at anl.gov>
Beam line Controls and Data Acquisition (BC, aka BCDA)
Advanced Photon Source,    Argonne National Laboratory
Argonne, IL  60439                    630 - 252 - 3189
-----------------------------------------------------------
      Education is the one thing for which people
         are willing to pay yet not receive.
-----------------------------------------------------------

References:
Epics Archiver Appliance requests and DST/Timezones Manoussakis, Adamandios via Tech-talk
RE: Epics Archiver Appliance requests and DST/Timezones Abdalla Ahmad via Tech-talk
Re: Epics Archiver Appliance requests and DST/Timezones Ralph Lange via Tech-talk
RE: Epics Archiver Appliance requests and DST/Timezones Manoussakis, Adamandios via Tech-talk

Navigate by Date:
Prev: Re: Re: Re: [EXTERNAL] Phoebus: Find/Replace and Write XML file 吴煊 via Tech-talk
Next: Re: [EXTERNAL] Phoebus: Find/Replace and Write XML file Pete Jemian via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: RE: Epics Archiver Appliance requests and DST/Timezones Manoussakis, Adamandios via Tech-talk
Next: RE: Epics Archiver Appliance requests and DST/Timezones Abdalla Ahmad via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
ANJ, 15 Nov 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·