EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: EPICS time
From: Marty Kraimer <[email protected]>
To: Mark Rivers <[email protected]>
Cc: [email protected]
Date: Mon, 05 Jan 2004 08:38:35 -0600
Mark Rivers wrote:
Folks,
I have a problem and a question about EPICS time under vxWorks in 3.14.4.
Problem: The environment variable EPICS_TS_NTP_INET is supposed to allow me to specify the IP address of an NTP server. My boot host (Windows) is not an NTP server, so I have used this environment variable to specify a valid NTP time server. This works fine under 3.13.7. However, when I boot the same system from 3.14.4 it does not work, I get an "iocClockSyncWithNTPServer: sntpcTimeGet S_sntpcLib_TIMEOUT error", and the "date" command says it's 1989.

I do not understand why this worked under 3.13 but not under 3.14.


How are you setting EPICS_TS_NTP_INET?
What does epicsPrtEnvParams show?
What does epicsEnvShow show?

I suspect that date shows a time very late in 1989. This is because the EPICS Epoc starts on Jan 1, 1990 but for UTC time not local time. Thus Jan 1 1990 00:00:00 is adjusted by the time zone.

Question: The environment variable EPICS_TS_MIN_WEST was used under 3.13 to set the timezone. This is no longer documented in 3.14.4, and indeed does not work. However, I could find no replacement variable documented either. Typing "envShow" in 3.14.4 shows that there is now an environment variable TIMEZONE which seems to set the timezone. Is this the correct way to do it, and if so what is the correct syntax. The value on my system is set to:
TIMEZONE CUS::360:040602:102602
Does this mean Central US, minutes west of Greenwhich and the start and end date of daylight time in 2002? If I want US eastern time this year what do I set this to?

The format is docummented in the vxWorks Reference Manual. Look at Libraries:ansiTime.


If TIMEZONE is not defined on a vxWorks system epics looks for EPICS_TIMEZONE, which is defined in <base>/configure/CONFIG_SITE_ENV/CONFIG_SITE_ENV

The idea is that the value defined in EPICS_TIMEZONE is the default which can be overridden by setting TIMEZONE before iocInit.

As delivered with current versions of base CONFIG_SITE_ENV defines:


EPICS_TIMEZONE=CUS::360:040602:102602


360 is the number of minutes from UTC time for USA Central Standard Time
040602 says that daylight savings time starts on April 6 at 02 hours.
102602 says that daylight savings time stops on Oct 26 at 02 hours.

Note that this was correct for 2003 (2002?) but will be wrong for 2004. The way vxWorks handles the time zone provides no way make this work forever. This is only a problem if timestamps are converted to ascii strings on vxWorks itself. Client on other systems that convert time stamps to ascii will not be affected.

Each site must set <base>/configure/CONFIG_SITE_ENV/CONFIG_SITE_ENV so that it is correct for itself.

In particular it is not possible to prepare a binary version on base in one time zone and use it in another time zone and have date work correctly. Sorry


Thanks,
Mark Rivers






Navigate by Date:
Next: Re: EPICS R.314.4 for solaris-sparc-gnu build problem Janet Anderson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Next: RE: EPICS time Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·