EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Problems within epicsTime.cpp
From: Kay-Uwe Kasemir <[email protected]>
To: "Denison, PN (Peter)" <[email protected]>
Cc: [email protected]
Date: Thu, 31 Jan 2008 09:02:38 -0500
Hi:

Yes, make it a constant.

Short story:
Originally that was just a constant as Peter suggested.
The current epicsTime initialization code is very interesting,
but doesn't give us any advantage.
On the contrary: We now have 2 examples for people loosing
a lot of time trying to debug it.

Longer detail about the other story:
A vxWorks specific problem with that section of
the epicsTime initialization code resulted in a similar 1-hour-off situation
for us in those weeks where the US used
a new pivotal date for the daylight saving time switch.
Some of the vxWorks back-and-forth routines from local to UTC
used tm_isdst, other didn't.
I think it was mktime which ignored the tm_isdst that you pass
in, instead using it's own idea about it, and that resulted
in a 1 hour error.
There's some tech-talk thread on this.
We hacked around that by NOT configuring the TIMEZONE
correctly until after iocInit:
When using EPICS_TIMEZONE, but leaving TIMEZONE blank,
the epicsTime initialization would do the back-and-forth
computations thinking it's running UTC,
and then TIMEZONE is set correctly to EPICS_TIMEZONE.

-Kay

On Jan 31, 2008, at 05:22 , Denison, PN (Peter) wrote:
I'm not entirely clear why we're going through the
whole rigmarole of calling mktime() twice, and calculating the
difference, rather than hard-coding the value of 631152000. It's not as
if the difference between the two epochs can vary. I had initially
thought that we could leave the existing code in place, and run
epicsEnvSet to set the timezone to UTC, and then revert it, then I
realised how unnecessary it is, since we are trying to get a constant
out.

Can I replace this code in epicsTimeLoadTimeInit with a constant?


Replies:
Re: Problems within epicsTime.cpp Andrew Johnson
References:
Problems within epicsTime.cpp Denison, PN (Peter)

Navigate by Date:
Prev: Problems within epicsTime.cpp Denison, PN (Peter)
Next: Re: Problems within epicsTime.cpp Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Problems within epicsTime.cpp Denison, PN (Peter)
Next: Re: Problems within epicsTime.cpp Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·