From 643db2e417f4273693041ffc7b8f534615cd5376 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 7 May 2007 20:50:38 +0000 Subject: [PATCH] Make sure the EPICS epoch is 1990-01-01T00:00:00 UTC --- src/libCom/test/epicsTimeTest.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/libCom/test/epicsTimeTest.cpp b/src/libCom/test/epicsTimeTest.cpp index 45ca892ac..31a40f2b6 100644 --- a/src/libCom/test/epicsTimeTest.cpp +++ b/src/libCom/test/epicsTimeTest.cpp @@ -46,9 +46,21 @@ MAIN(epicsTimeTest) const int nTimes = 10; const double precisionEPICS = 1.0 / nSecPerSec; - testPlan(10 + nTimes * 18); + testPlan(15 + nTimes * 18); const epicsTime begin = epicsTime::getCurrent(); + + { + const epicsTimeStamp epochTS = {0, 0}; + epicsTime epochET = epochTS; + struct gm_tm_nano_sec epicsEpoch = epochET; + testOk1(epicsEpoch.ansi_tm.tm_sec == 0); + testOk1(epicsEpoch.ansi_tm.tm_min == 0); + testOk1(epicsEpoch.ansi_tm.tm_hour == 0); + testOk1(epicsEpoch.ansi_tm.tm_yday == 0); + testOk1(epicsEpoch.ansi_tm.tm_year == 90); + } + { epicsTime tsi = epicsTime::getCurrent (); l_fp ntp = tsi;