Index: /trunk/Ohana/src/addstar/src/get2mass_as.c
===================================================================
--- /trunk/Ohana/src/addstar/src/get2mass_as.c	(revision 5902)
+++ /trunk/Ohana/src/addstar/src/get2mass_as.c	(revision 5903)
@@ -36,15 +36,19 @@
   if (photcode == TM_J) {
       FilterSkip = 6;
-      TimeSkip = 23;
+      // TimeSkip = 23;
+      TimeSkip = 28;
       Qentry   = 0;
   }
   if (photcode == TM_H) {
       FilterSkip = 10;
-      TimeSkip = 19;
+      // TimeSkip = 19;
+      TimeSkip = 24;
       Qentry   = 1;
   }
   if (photcode == TM_K) {
       FilterSkip = 14;
-      TimeSkip = 15;
+      // looks like this should be 20, not 15...
+      // TimeSkip = 15;
+      TimeSkip = 20;
       Qentry   = 2;
   }
@@ -163,5 +167,6 @@
 }
   
-e_time get2mass_time (char *ptr, char *buffer, int Nbound, int Nbyte) {
+// this function retrieves the time from the DATE field
+e_time get2mass_date (char *ptr, char *buffer, int Nbound, int Nbyte) {
 
   e_time time;
@@ -174,4 +179,23 @@
   *end = 0;
   time = date_to_sec (ptr);
+  *end = '|';
+
+  return (time);
+}
+
+// this function retrieves the time from the JDATE field (%12.4f)
+e_time get2mass_time (char *ptr, char *buffer, int Nbound, int Nbyte) {
+
+  e_time time;
+  double jd;
+  char *p, *end;
+
+  p = skipNbounds (ptr, '|', Nbound, Nbyte - (ptr - buffer));
+  if (p == NULL) Shutdown ("format error in 2mass");
+  end = memchr (p, '|', Nbyte - (p - buffer));
+  if (end == NULL) Shutdown ("format error in 2mass");
+  *end = 0;
+  jd = strtod (p, NULL);
+  time = jd_to_sec (jd);
   *end = '|';
 
