Index: /trunk/psModules/src/concepts/pmConceptsStandard.c
===================================================================
--- /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 23431)
+++ /trunk/psModules/src/concepts/pmConceptsStandard.c	(revision 23432)
@@ -606,4 +606,78 @@
 }
 
+// Get the current value of a concept
+static psMetadataItem *conceptGet(const pmFPA *fpa, // FPA of interest
+                                  const pmChip *chip, // Chip of interest, or NULL
+                                  const pmCell *cell, // Cell of interest, or NULL
+                                  const char *name // Concept name
+    )
+{
+    psMetadataItem *item = NULL;        // Item with time system
+    if (cell) {
+        item = psMetadataLookup(cell->concepts, name);
+    }
+    if (!item && chip) {
+        item = psMetadataLookup(chip->concepts, name);
+    }
+    if (!item && fpa) {
+        item = psMetadataLookup(fpa->concepts, name);
+    }
+    if (!item) {
+        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find %s in concepts", name);
+        return NULL;
+    }
+    return item;
+}
+
+// Determine the corresponding TIMESYS for one of the TIME concepts
+static psTimeType conceptGetTimesysForTime(const char *name, // Concept name ("CELL.TIME" or "FPA.TIME")
+                                           const pmFPA *fpa, // FPA of interest
+                                           const pmChip *chip, // Chip of interest, or NULL
+                                           const pmCell *cell // Cell of interest, or NULL
+                                           )
+{
+    assert(name);
+
+    psString timesysName = psStringCopy(name); // e.g., "CELL.TIME" --> "CELL.TIMESYS"
+    psStringSubstitute(&timesysName, "TIMESYS", "TIME");
+    psMetadataItem *item = conceptGet(fpa, chip, cell, timesysName); // Time system
+    psFree(timesysName);
+
+    if (!item || item->type != PS_TYPE_S32) {
+        psWarning("Unable to find %s --- assuming UTC", timesysName);
+        return PS_TIME_UTC;
+    }
+    return item->data.S32;
+}
+
+// Set the corresponding TIMESYS for one of the TIME concepts
+static bool conceptSetTimesysForTime(const char *name, // Concept name ("CELL.TIME" or "FPA.TIME")
+                                     const pmFPA *fpa, // FPA of interest
+                                     const pmChip *chip, // Chip of interest, or NULL
+                                     const pmCell *cell, // Cell of interest, or NULL
+                                     psTimeType timeSys // The time system value
+                                     )
+{
+    assert(name);
+
+    psString timesysName = psStringCopy(name); // e.g., "CELL.TIME" --> "CELL.TIMESYS"
+    psStringSubstitute(&timesysName, "TIMESYS", "TIME");
+    psMetadataItem *item = conceptGet(fpa, chip, cell, timesysName); // Time system
+    psFree(timesysName);
+
+    if (!item) {
+        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find %s in concepts when setting %s\n",
+                timesysName, name);
+        return false;
+    }
+
+    if (item->data.S32 != -1 && item->data.S32 != timeSys) {
+        psWarning("Time system is set to %x; but should be %x", item->data.S32, timeSys);
+    }
+
+    item->data.S32 = timeSys;
+
+    return true;
+}
 
 psMetadataItem *p_pmConceptParse_TIMESYS(const psMetadataItem *concept,
@@ -622,5 +696,5 @@
     if (concept->type != PS_DATA_STRING || strlen(sys) <= 0) {
         // XXX is this too low verbosity?
-        psLogMsg ("psModules.concepts", PS_LOG_DETAIL, "Can't interpret %s --- assuming UTC.\n", pattern->name);
+        psWarning("Can't interpret %s --- assuming UTC.", pattern->name);
     } else if (strcasecmp(sys, "TAI") == 0) {
         timeSys = PS_TIME_TAI;
@@ -633,5 +707,11 @@
     } else {
         // XXX is this too low verbosity?
-        psLogMsg ("psModules.concepts", PS_LOG_DETAIL, "Can't interpret %s --- assuming UTC.\n", pattern->name);
+        psWarning("Can't interpret %s --- assuming UTC.", pattern->name);
+    }
+
+    psMetadataItem *old = conceptGet(fpa, chip, cell, pattern->name); // Old value
+    if (old && old->data.S32 != -1 && old->data.S32 != timeSys) {
+        psWarning("%s is already set (%x) and not consistent with new value (%x)",
+                  pattern->name, old->data.S32, timeSys);
     }
 
@@ -639,70 +719,4 @@
 }
 
-// Determine the corresponding TIMESYS for one of the TIME concepts
-static psTimeType conceptGetTimesysForTime(const char *name, // Concept name ("CELL.TIME" or "FPA.TIME")
-                                           const pmFPA *fpa, // FPA of interest
-                                           const pmChip *chip, // Chip of interest, or NULL
-                                           const pmCell *cell // Cell of interest, or NULL
-                                           )
-{
-    assert(name);
-
-    psString timesysName = psStringCopy(name); // e.g., "CELL.TIME" --> "CELL.TIMESYS"
-    psStringSubstitute(&timesysName, "TIMESYS", "TIME");
-    bool mdok = false;                  // Result of MD lookup
-    psTimeType timeSys = 0xFFFFFFFF;    // The time system
-    if (cell) {
-        timeSys = psMetadataLookupS32(&mdok, cell->concepts, timesysName);
-    }
-    if (!mdok && chip) {
-        timeSys = psMetadataLookupS32(&mdok, chip->concepts, timesysName);
-    }
-    if (!mdok && fpa) {
-        timeSys = psMetadataLookupS32(&mdok, fpa->concepts, timesysName);
-    }
-    if (!mdok || (timeSys == 0xFFFFFFFF)) {
-        psWarning("Unable to find %s in concepts when parsing %s --- assuming UTC.\n",
-                  timesysName, name);
-        timeSys = PS_TIME_UTC;
-    }
-    psFree(timesysName);
-
-    return timeSys;
-}
-
-// Set the corresponding TIMESYS for one of the TIME concepts
-static bool conceptSetTimesysForTime(const char *name, // Concept name ("CELL.TIME" or "FPA.TIME")
-                                     const pmFPA *fpa, // FPA of interest
-                                     const pmChip *chip, // Chip of interest, or NULL
-                                     const pmCell *cell, // Cell of interest, or NULL
-                                     psTimeType timeSys // The time system value
-                                     )
-{
-    assert(name);
-
-    psString timesysName = psStringCopy(name); // e.g., "CELL.TIME" --> "CELL.TIMESYS"
-    psStringSubstitute(&timesysName, "TIMESYS", "TIME");
-    psMetadataItem *item = NULL;        // Item with time system
-    if (cell) {
-        item = psMetadataLookup(cell->concepts, timesysName);
-    }
-    if (!item && chip) {
-        item = psMetadataLookup(chip->concepts, timesysName);
-    }
-    if (!item && fpa) {
-        item = psMetadataLookup(fpa->concepts, timesysName);
-    }
-    psFree(timesysName);
-    if (!item) {
-        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find %s in concepts when setting %s\n",
-                timesysName, name);
-        return false;
-    }
-
-    item->data.S32 = timeSys;
-
-    // Ensure the updated TIMESYS is written
-    return pmConceptWriteSingle(fpa, chip, cell, NULL, item);
-}
 
 
