Index: /trunk/psLib/src/astro/psTime.c
===================================================================
--- /trunk/psLib/src/astro/psTime.c	(revision 22704)
+++ /trunk/psLib/src/astro/psTime.c	(revision 22705)
@@ -1259,17 +1259,13 @@
 double psTimeToJD(const psTime *time)
 {
-    psF64 jd = NAN;
-
     // Error checks
     PS_ASSERT_PTR_NON_NULL(time,NAN);
     PS_ASSERT_INT_WITHIN_RANGE(time->nsec,0,(psU32)((1e9)-1),NAN);
 
+    // ADD says that this formula works only for PS_TIME_TAI, so adding the following:
     psTime *time2 = psTimeCopy(time);
-    //XXX: ADD says that this formula works only for PS_TIME_TAI, so adding the following:
-    if (time->type == PS_TIME_UTC || time->type == PS_TIME_TT) {
-        psTimeConvert(time2, PS_TIME_TAI);
-    }
-
-    // Julian date conversion
+    psTimeConvert(time2, PS_TIME_TAI);
+
+    double jd;                          // Julian date, to return
     if (time2->sec < 0) {
         // psTime earlier than epoch
@@ -1279,6 +1275,6 @@
         jd = time2->sec / SEC_PER_DAY + time2->nsec / NSEC_PER_DAY + JD_EPOCH_OFFSET;
     }
-
     psFree(time2);
+
     return jd;
 }
@@ -1286,16 +1282,13 @@
 double psTimeToMJD(const psTime *time)
 {
-    psF64 mjd = NAN;
-
     // Error checks
     PS_ASSERT_PTR_NON_NULL(time,NAN);
     PS_ASSERT_INT_WITHIN_RANGE(time->nsec,0,(psU32)((1e9)-1),NAN);
+
+    // ADD says that this formula works only for PS_TIME_TAI, so adding the following:
     psTime *time2 = psTimeCopy(time);
-    //XXX: ADD says that this formula works only for PS_TIME_TAI, so adding the following:
-    if (time->type == PS_TIME_UTC || time->type == PS_TIME_TT) {
-        psTimeConvert(time2, PS_TIME_TAI);
-    }
-
-    // Modified Julian date conversion
+    psTimeConvert(time2, PS_TIME_TAI);
+
+    double mjd;                         // Modified Julian Date, to return
     if (time2->sec < 0) {
         // psTime earlier than epoch
@@ -1306,4 +1299,5 @@
     }
     psFree(time2);
+
     return mjd;
 }
