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  <20182019  2020  2021  2022  2023  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Unix epoch time conversion in EPICS Db
From: Rod Nussbaumer <[email protected]>
To: [email protected]
Date: Thu, 29 Mar 2018 08:14:18 -0700
Hi all.
I'm using streamDevice to read string data from a device, and one of the data that it returns is the Unix Epoch time as a floating point value in ASCII string format:
TIME_NOW:1522335837.961008
I would like to be able to translate this to a more human readable format. Is there any built-in function in an IOC (3.14.12.5 right now) that I can use to do the conversion? Or, does anyone have a set of reliable CALC record expressions that can be used to get me something like YY:MM:DD-hh:mm:ss in any displayable format? I know the formula to do this has all sorts of quirky exceptions and so on, so I'd like to avoid trying to roll my own if I can avoid it, especially if the facility to do it already exists.
Thanks.


Rod Nussbaumer
TRIUMF
Vancouver, Canada.



Replies:
Re: Unix epoch time conversion in EPICS Db Mooney, Tim M.

Navigate by Date:
Prev: Re: StreamDevice with Telnet port Dirk Zimoch
Next: Re: Unix epoch time conversion in EPICS Db Mooney, Tim M.
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: camonitor not updating when PV changed Sobhani, Bayan
Next: Re: Unix epoch time conversion in EPICS Db Mooney, Tim M.
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 29 Mar 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·