Index: /trunk/Ohana/src/imregister/base/misc.c
===================================================================
--- /trunk/Ohana/src/imregister/base/misc.c	(revision 13)
+++ /trunk/Ohana/src/imregister/base/misc.c	(revision 14)
@@ -1,3 +1,8 @@
 # include "imregister.h"
+
+static double tz = 0.0;
+void set_timezone (double dt) {
+  tz = dt;
+}
 
 /***** convert [-]00:00:00 to 0.0000 ****/
@@ -217,4 +222,5 @@
   
   ALLOCATE (line, char, 64);
+  second -= 3600*tz;
   gmt   = gmtime (&second);
   sprintf (line, "%4d/%02d/%02d,%02d:%02d:%02d", 1900+gmt[0].tm_year, gmt[0].tm_mon+1, gmt[0].tm_mday, gmt[0].tm_hour, gmt[0].tm_min, gmt[0].tm_sec); 
@@ -279,4 +285,6 @@
   
   second = (jd - 2440587.5)*86400 + 3600.0*now.tm_hour + now.tm_min*60.0 + now.tm_sec;
+
+  second += 3600*tz;
 
   return (second);
Index: /trunk/Ohana/src/imregister/detrend/output.c
===================================================================
--- /trunk/Ohana/src/imregister/detrend/output.c	(revision 13)
+++ /trunk/Ohana/src/imregister/detrend/output.c	(revision 14)
@@ -90,30 +90,30 @@
   fits_define_table_column (&theader, "A256", "PATH",       "filename in db",            "");
   
-  /* define TNULL, TBNA values */
-  fits_modify (&theader, "TNULL1",  "%s", 1, "");
-  fits_modify (&theader, "TNULL2",  "%s", 1, "");
-  fits_modify (&theader, "TNULL3",  "%s", 1, "");
-  fits_modify (&theader, "TNULL4",  "%s", 1, "");
-  fits_modify (&theader, "TNULL5",  "%lf", 1, (float) -1);
-  fits_modify (&theader, "TNULL6",  "%s", 1, "");
-  fits_modify (&theader, "TNULL7",  "%s", 1, "");
-  fits_modify (&theader, "TNULL8",  "%s", 1, "");
-  fits_modify (&theader, "TNULL9",  "%d", 1, -1);
-  fits_modify (&theader, "TNULL10", "%d", 1, -1);
-  fits_modify (&theader, "TNULL11", "%s", 1, "");
-  fits_modify (&theader, "TNULL12", "%s", 1, "");
-
-  fits_modify (&theader, "TBNAN1",  "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN2",  "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN3",  "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN4",  "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN5",  "%lf", 1, (float) -2);
-  fits_modify (&theader, "TBNAN6",  "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN7",  "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN8",  "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN9",  "%d", 1, -2);
-  fits_modify (&theader, "TBNAN10", "%d", 1, -2);
-  fits_modify (&theader, "TBNAN11", "%s", 1, "NA");
-  fits_modify (&theader, "TBNAN12", "%s", 1, "NA");
+  /* define TNULL, TNVAL values */
+  fits_modify (&theader, "TNULL1",  "%s", 1, "NULL");  /* KEY        */
+  fits_modify (&theader, "TNULL2",  "%s", 1, "NULL");  /* START_TIME */
+  fits_modify (&theader, "TNULL3",  "%s", 1, "NULL");  /* STOP_TIME  */
+  fits_modify (&theader, "TNULL4",  "%s", 1, "NULL");  /* REG_TIME   */
+  fits_modify (&theader, "TNULL5",  "%s", 1, "NaN");   /* EXPTIME    */
+  fits_modify (&theader, "TNULL6",  "%s", 1, "NULL");  /* IMAGETYP   */
+  fits_modify (&theader, "TNULL7",  "%s", 1, "NULL");  /* FILTER     */
+  fits_modify (&theader, "TNULL8",  "%s", 1, "NULL");  /* CCDID      */
+  fits_modify (&theader, "TNULL9",  "%s", 1, "-1");    /* VERSION    */
+  fits_modify (&theader, "TNULL10", "%s", 1, "-1");    /* ORDER      */
+  fits_modify (&theader, "TNULL11", "%s", 1, "NULL");  /* LABEL      */
+  fits_modify (&theader, "TNULL12", "%s", 1, "NULL");  /* PATH       */
+
+  fits_modify (&theader, "TNVAL1",  "%s", 1, "NA");    /* KEY        */
+  fits_modify (&theader, "TNVAL2",  "%s", 1, "NA");    /* START_TIME */
+  fits_modify (&theader, "TNVAL3",  "%s", 1, "NA");    /* STOP_TIME  */
+  fits_modify (&theader, "TNVAL4",  "%s", 1, "NA");    /* REG_TIME   */
+  fits_modify (&theader, "TNVAL5",  "%s", 1, "Inf");   /* EXPTIME    */
+  fits_modify (&theader, "TNVAL6",  "%s", 1, "NA");    /* IMAGETYP   */
+  fits_modify (&theader, "TNVAL7",  "%s", 1, "NA");    /* FILTER     */
+  fits_modify (&theader, "TNVAL8",  "%s", 1, "NA");    /* CCDID      */
+  fits_modify (&theader, "TNVAL9",  "%s", 1, "-2");    /* VERSION    */
+  fits_modify (&theader, "TNVAL10", "%s", 1, "-2");    /* ORDER      */
+  fits_modify (&theader, "TNVAL11", "%s", 1, "NA");    /* LABEL      */
+  fits_modify (&theader, "TNVAL12", "%s", 1, "NA");    /* PATH       */
 
   /* create table, add data values */
Index: /trunk/Ohana/src/imregister/imreg/args.imsearch.c
===================================================================
--- /trunk/Ohana/src/imregister/imreg/args.imsearch.c	(revision 13)
+++ /trunk/Ohana/src/imregister/imreg/args.imsearch.c	(revision 14)
@@ -5,4 +5,5 @@
 int args (int argc, char **argv) {
 
+  double dt;
   int N, i;
 
@@ -10,4 +11,12 @@
   ConfigCamera ();          /* load camera information */
   ConfigFilter ();          /* load filter information */
+
+  /* set timezone (set static in misc.c) */
+  if (N = get_argument (argc, argv, "-tz")) {
+    remove_argument (N, &argc, argv);
+    dt = atof (argv[N]);
+    set_timezone (dt);
+    remove_argument (N, &argc, argv);
+  }
 
   /* define time range */
Index: /trunk/Ohana/src/imregister/imreg/output.c
===================================================================
--- /trunk/Ohana/src/imregister/imreg/output.c	(revision 13)
+++ /trunk/Ohana/src/imregister/imreg/output.c	(revision 14)
@@ -209,4 +209,15 @@
   fits_define_table_column (&theader, "F5.2",  "FWHM",       "image quality",        "pixels",                         1.0, 0.0); 
 
+  /* define TNULL, TNVAL values */
+  fits_modify (&theader, "TNULL1",  "%s", 1, "NULL");  /* FILE  */
+  fits_modify (&theader, "TNULL2",  "%s", 1, "NaN");   /* SKY   */
+  fits_modify (&theader, "TNULL3",  "%s", 1, "NaN");   /* BIAS  */
+  fits_modify (&theader, "TNULL4",  "%s", 1, "NaN");   /* FWHM  */
+
+  fits_modify (&theader, "TNVAL1",  "%s", 1, "NA");    /* FILE  */
+  fits_modify (&theader, "TNVAL2",  "%s", 1, "Inf");   /* SKY   */
+  fits_modify (&theader, "TNVAL3",  "%s", 1, "Inf");   /* BIAS  */
+  fits_modify (&theader, "TNVAL4",  "%s", 1, "Inf");   /* FWHM  */
+
   /* create table, add data values */
   fits_create_table (&theader, &table);
Index: /trunk/Ohana/src/imregister/include/imreg.h
===================================================================
--- /trunk/Ohana/src/imregister/include/imreg.h	(revision 13)
+++ /trunk/Ohana/src/imregister/include/imreg.h	(revision 14)
@@ -22,4 +22,5 @@
   char *oldpath, *newpath;
 
+  int HST;
   int verbose;
   char *table;
@@ -64,2 +65,3 @@
 int load_probes (char *filename, unsigned long tzero, int *wantprobe, double *values, int Nprobe);
 int define_table (Header *header, Matrix *matrix, Header *theader, FTable *table);
+void set_timezone (double dt);
