EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  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  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: about dylight saving time
From: Marty Kraimer <[email protected]>
To: Noboru Yamamoto <[email protected]>
Cc: liushu <[email protected]>, "[email protected]" <[email protected]>
Date: Fri, 25 Feb 2005 07:27:43 -0600

For 3.13 the fix is as Noboru shows below, i.e. you must set TIMEZONE on
each IOC.

For 3.14 the following appears in configure/CONFIG_SITE_ENV


# EPICS_TIMEZONE
# local timezone info for vxWorks IOCs. The format required is
# <name>::<minutesWest>:<start daylight>:<end daylight>
# where the start and end are mmddhh - that is month,day,hour
# eg EPICS_TIMEZONE=CUS::360:033102:102802
#
# DST for 2004 US: Apr 4 - Oct 31
# EU: Mar 28 - Oct 31
# (see: http://www.worldtimezone.org/daylight.html)
#
# EPICS_TS_NTP_INET
# NTP or Unix time server ip address. Uses boot host if not set.

EPICS_TIMEZONE=CUS::360:040402:103102
#EPICS_TIMEZONE=MET::-60:032802:103102


By setting EPICS_TIMEZONE every 3.14 IOC at your site will have the
correct date/time. You do not have to set TIMEZONE on each IOC. It will
be done automatically.

Notes for both 3.13 and 3.14

1) This is only a problem on vxWorks IOCs and only when an epics
timestamp is converted to an ascii string containing the date and time.
2) The beginning and end of daylight savings time changes every year (at
least in the USA). Thus EPICS_TIMEZONE must be changed every year if
your local time uses daylight savings time.
3) This is NOT a problem for channel access clients because the epics
time stamp has UTC time.


Marty Kraimer

Noboru Yamamoto wrote:

>liushu wrote:
>  
>
>>Hi,everyone!
>>Our epics release is base3.13.8, in July we set environment variables in config/CONFIG_SITE_ENV such as
>>
>>EPICS_TS_MIN_WEST=-420
>>EPICS_TS_NTP_INET=***.***.***.***
>>
>>in order that the IOC's time is the same to the NTP server.
>>
>>But now, in Feb,when we run the command "date" on the IOC, we find
>>    
>>
>it's late one hour than normal, Because here we have no daylight saving
>time,so we have to modified the "EPICS_TS_MIN_WEST=-480".
>  
>
>>Does that mean we must modify the "EPICS_TS_MIN_WEST" every year? Who
>>
>>    
>>
>know how can cancel the daylight saving time?
>  
>
>Looking at the code you attached, you can define TIMEZONE environment
>variable
>instead of EPICS_TS_MIN_WEST. How about defining  TIMEZONE as:
>
>TIMEZONE=UTC::-420:0:0
>
>Regards,
>
>Noboru
>
>  
>
>>I only find some script in the base/src/db/drvTS.c like these:
>>
>>
>>
>> /*
>>
>>    This section sets up the vxWorks clock for use with the ansiLib
>>
>>    functions.  The TIMEZONE environment variable for vxWorks is only
>>
>>    overwritten if it has not been set.  It seems as though the day
>>
>>    light saving time does not work (at least following the directions
>>
>>    in ansiLib).
>>
>> 
>>
>>    The EPICS environment variable EPICS_TS_MIN_WEST holds the minutes
>>
>>    west of GMT (UTC) time.  This variable should be preset by the EPICS
>>
>>    administrator for your site.
>>
>>    */
>>
>> 
>>
>> 
>>
>>if(getenv("TIMEZONE")==(char*)NULL)
>>
>>    {
>>
>>        if(envGetConfigParam(&EPICS_TS_MIN_WEST,sizeof(min_west),min_west)==NULL
>>
>>          || strlen(min_west)==0)
>>
>>        {
>>
>>            TSprintf("TS initialization: No Time Zone Information\n");
>>
>>        }
>>
>>        else
>>
>>        {
>>
>>            sprintf(tz,"TIMEZONE=UTC::%s:040102:100102",min_west);
>>
>>            if(putenv(tz)==ERROR)
>>
>>            {
>>
>>                TSprintf("TS initialization: TIMEZONE putenv failed\n");
>>
>>            }
>>
>>        }
>>
>>    }
>>
>> 
>>
>>    TSdriverInit(); /* Call the user's driver initialization if supplied */
>>
>>    return 0;
>>
>>}
>>
>> Best regards
>> 				
>>
>> Liushu  
>> Control Group, Accelerator Center
>> Institute of high energy physics (IHEP)
>> P.O.Box 918-10,100039
>> Beijing, P.R.China
>> Tel: +86-10-88236274-804,   Fax: +86-10-88236190
>> e-mail: [email protected]
>>         
>>    
>>
>
>
>  
>



References:
about dylight saving time liushu
Re: about dylight saving time Noboru Yamamoto

Navigate by Date:
Prev: Re: about dylight saving time Noboru Yamamoto
Next: [Fwd: network storms and epics] Geoff Savage
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: about dylight saving time Noboru Yamamoto
Next: [Fwd: network storms and epics] Geoff Savage
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·