Matt,
Could you try the attached patch for Base? It adds an iocsh
function zoneset(). For US eastern time I can use
'zoneset("EST5EDT")' and see the change reflected in
generalTimeReport().
Michael
On 04/25/2016 07:13 PM, Matt Rippa wrote:
Turns out access to NVRAM variables like epics-tz
only work with MOTLOAD firmware (mvme-6100).
On the PPC1-BUG firmware (mvme-2700) there isn't an obvious
way.
For now, I'll have to define this in
base/configure/CONFIG_SITE_ENV for each of our sites Hawaii
and Chile.
For Chile, this is a terrible situation. They can't make up
their mind about standard time. They will be starting daylight
saving time in May.
So it looks like we'll have to rebuild EPICS Base each time
their clocks change? Or choose a different BSP?
Can anyone confirm that the "epics-tz" variable is the
preferred solution for the mvme-6100 (beatnik) BSP?
Thank you all for input!
-Matt
|
>From d196a5e336ea5672ca7a369346b6976b99e3f5f7 Mon Sep 17 00:00:00 2001
From: Michael Davidsaver <[email protected]>
Date: Tue, 26 Apr 2016 07:49:17 -0400
Subject: RTEMS: add zoneset iocsh function
---
src/RTEMS/base/rtems_init.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/RTEMS/base/rtems_init.c b/src/RTEMS/base/rtems_init.c
index e89006b..ebbe9a0 100644
--- a/src/RTEMS/base/rtems_init.c
+++ b/src/RTEMS/base/rtems_init.c
@@ -433,6 +433,23 @@ static void nfsMountCallFunc(const iocshArgBuf *args)
}
#endif
+void zoneset(const char *zone)
+{
+ if(zone)
+ setenv("TZ", zone, 1);
+ else
+ unsetenv("TZ");
+ tzset();
+}
+
+static const iocshArg zonesetArg0 = {"zone string", iocshArgString};
+static const iocshArg * const zonesetArgs[1] = {&zonesetArg0};
+static const iocshFuncDef zonesetFuncDef = {"zoneset",1,zonesetArgs};
+static void zonesetCallFunc(const iocshArgBuf *args)
+{
+ zoneset(args[0].sval);
+}
+
/*
* Register RTEMS-specific commands
*/
@@ -443,6 +460,7 @@ static void iocshRegisterRTEMS (void)
#ifndef OMIT_NFS_SUPPORT
iocshRegister(&nfsMountFuncDef, nfsMountCallFunc);
#endif
+ iocshRegister(&zonesetFuncDef, &zonesetCallFunc);
}
/*
--
2.1.4
- Replies:
- Re: EPICS_TIMEZONE and TZ on RTEMS Michael Davidsaver
- References:
- EPICS_TIMEZONE and TZ on RTEMS Matt Rippa
- Re: EPICS_TIMEZONE and TZ on RTEMS Michael Davidsaver
- Re: EPICS_TIMEZONE and TZ on RTEMS Matt Rippa
- Re: EPICS_TIMEZONE and TZ on RTEMS Matt Rippa
- Navigate by Date:
- Prev:
RE: Generating log output from areaDetector IOC Mark Rivers
- Next:
Re: EPICS 3.14.12.3 Build Problems with the new Ubuntu 16.04 LTS Michael Davidsaver
- 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
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: EPICS_TIMEZONE and TZ on RTEMS Matt Rippa
- Next:
Re: EPICS_TIMEZONE and TZ on RTEMS Michael Davidsaver
- 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
2022
2023
2024
|