Index: /tags/ipp-ops-20220705-ippref/psastro/src/psastroConvert.c
===================================================================
--- /tags/ipp-ops-20220705-ippref/psastro/src/psastroConvert.c	(revision 42269)
+++ /tags/ipp-ops-20220705-ippref/psastro/src/psastroConvert.c	(revision 42270)
@@ -509,4 +509,6 @@
   float myPltScale = fabs(pltScale[chipID]);
 
+  psLogMsg ("psastro.correctKH", PS_LOG_INFO, "applying KH correction to %s (%d)\n", chipName, chipID);
+
   // apply the correction to the detections
   for (int i = 0; i < inStars->n; i++) {
Index: /tags/ipp-ops-20220705-ippref/psastro/src/psastroDefineFiles.c
===================================================================
--- /tags/ipp-ops-20220705-ippref/psastro/src/psastroDefineFiles.c	(revision 42269)
+++ /tags/ipp-ops-20220705-ippref/psastro/src/psastroDefineFiles.c	(revision 42270)
@@ -61,5 +61,7 @@
 	    return false;
 	}
-	psTime *endtime = psTimeFromString (KHendDate, PS_TIME_TAI);
+	// psTime *endtime = psTimeFromString (KHendDate, PS_TIME_TAI);
+	// 'endtime' and 'time' must be in the same units 
+	psTime *endtime = psTimeFromString (KHendDate, time->type);
 	if (!endtime) {
 	    psError (PM_ERR_CONFIG, false, "KH.CORRECT.APPLY requested, KH.CORRECT.ENDDATE has an invalid date/time");
Index: /tags/ipp-ops-20220705-ippref/psastro/src/psastroLoadRefstars.c
===================================================================
--- /tags/ipp-ops-20220705-ippref/psastro/src/psastroLoadRefstars.c	(revision 42269)
+++ /tags/ipp-ops-20220705-ippref/psastro/src/psastroLoadRefstars.c	(revision 42270)
@@ -139,4 +139,19 @@
     psStringAppend (&getstarCommand, " -region %f %f %f %f -o %s", RAmin, DECmin, RAmax, DECmax, tempFile);
     psTrace ("psastro", 3, "%s\n", getstarCommand);
+
+    // add the MJD for the exposure EPOCH
+    bool ProperMotionApply = psMetadataLookupF32 (&status, recipe, "DVO.GETSTAR.PM.APPLY");
+    if (ProperMotionApply) {
+      pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, source); // we've already done this before
+      myAssert (input, "oops");
+
+      psTime *time = psMetadataLookupPtr(NULL, input->fpa->concepts, "FPA.TIME");
+      if (time->sec == 0 && time->nsec == 0) {
+	psError (PM_ERR_CONFIG, false, "Exposure EPOCH proper motion correction requested, but date/time of exposure not found");
+	return false;
+      }
+      psF64 EpochMJD = psTimeToMJD(time);
+      psStringAppend (&getstarCommand, " -epoch-mjd %lf", EpochMJD);
+    }
 
     psLogMsg("psastro", PS_LOG_INFO, "getstar command: %s", getstarCommand);
