Index: trunk/psLib/src/astro/psEarthOrientation.c
===================================================================
--- trunk/psLib/src/astro/psEarthOrientation.c	(revision 22681)
+++ trunk/psLib/src/astro/psEarthOrientation.c	(revision 22682)
@@ -767,5 +767,5 @@
     psTime *in = psTimeCopy(time);
     if (in->type != PS_TIME_UT1) {
-        in = psTimeConvert(in, PS_TIME_UT1);
+        psTimeConvert(in, PS_TIME_UT1);
     }
     //Check if tidal corrections should be included.
Index: trunk/psLib/src/astro/psTime.c
===================================================================
--- trunk/psLib/src/astro/psTime.c	(revision 22681)
+++ trunk/psLib/src/astro/psTime.c	(revision 22682)
@@ -66,9 +66,9 @@
 static char *cleanString(char *inString, int sLen);
 static char* getToken(char **inString, char *delimiter, psParseErrorType *status);
-static psTime* convertTimeTAIUTC(psTime* time);
-static psTime* convertTimeUTCTAI(psTime* time);
-static psTime* convertTimeTAITT(psTime* time);
-static psTime* convertTimeTTTAI(psTime* time);
-static psTime* convertTimeUTCUT1(psTime* time);
+static bool convertTimeTAIUTC(psTime* time);
+static bool convertTimeUTCTAI(psTime* time);
+static bool convertTimeTAITT(psTime* time);
+static bool convertTimeTTTAI(psTime* time);
+static bool convertTimeUTCUT1(psTime* time);
 
 static bool timeInit(const char *fileName);
@@ -510,5 +510,5 @@
 }
 
-static psTime* convertTimeTAIUTC(psTime* time)
+static bool convertTimeTAIUTC(psTime* time)
 {
     psF64  deltaTAI     = 0.0;
@@ -550,8 +550,8 @@
     }
 
-    return time;
-}
-
-static psTime* convertTimeUTCTAI(psTime* time)
+    return true;
+}
+
+static bool convertTimeUTCTAI(psTime* time)
 {
     psF64  delta     = 0.0;
@@ -580,10 +580,8 @@
     time->type = PS_TIME_TAI;
 
-    //XXX: Set leapseconds to TRUE
-    //    time->leapsecond = true;
-    return time;
-}
-
-static psTime* convertTimeTAITT(psTime* time)
+    return true;
+}
+
+static bool convertTimeTAITT(psTime* time)
 {
     // Add TT offset
@@ -600,8 +598,8 @@
     time->type = PS_TIME_TT;
 
-    return time;
-}
-
-static psTime* convertTimeTTTAI(psTime* time)
+    return true;
+}
+
+static bool convertTimeTTTAI(psTime* time)
 {
     // Subtract TT offset
@@ -625,8 +623,8 @@
     time->type = PS_TIME_TAI;
 
-    return time;
-}
-
-static psTime* convertTimeUTCUT1(psTime* time)
+    return true;
+}
+
+static bool convertTimeUTCUT1(psTime* time)
 {
     psS64   ut1utc  = 0;
@@ -664,95 +662,74 @@
     time->type = PS_TIME_UT1;
 
-    return time;
-}
-
-psTime* psTimeConvert(psTime *time,
-                      psTimeType type)
+    return true;
+}
+
+bool psTimeConvert(psTime *time, psTimeType type)
 {
     // Error checks
-    PS_ASSERT_PTR_NON_NULL(time,NULL);
-    PS_ASSERT_INT_WITHIN_RANGE(time->nsec,0,(psU32)((1e9)-1), NULL);
-
-    // If the input type is UT1 then return time and generate error message
+    PS_ASSERT_PTR_NON_NULL(time, false);
+    PS_ASSERT_INT_WITHIN_RANGE(time->nsec, 0, (psU32)((1e9)-1), false);
+
     if (time->type == PS_TIME_UT1) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE,true,"Cannot convert from UT1 time type");
-        return NULL;
-    }
-
-    // If the time to convert to is the same as psTime the return time
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot convert from UT1 time type");
+        return false;
+    }
     if (time->type == type) {
-        return time;
-    }
-
-    // Convert from TAI to UTC, TT, UT1
-    if (time->type == PS_TIME_TAI) {
-        // Convert from TAI to UTC
-        if (type == PS_TIME_UTC) {
-            time = convertTimeTAIUTC(time);
-            // Convert from TAI to TT
-        } else if (type == PS_TIME_TT) {
-            time = convertTimeTAITT(time);
-            // Convert from TAI to UT1
-        } else if (type == PS_TIME_UT1) {
-            // Convert to UTC first
-            time = convertTimeTAIUTC(time);
-            // Convert UTC to UT1
-            time = convertTimeUTCUT1(time);
-            // Convert from TAI to unknown time type
-        } else {
+        // No action required
+        return true;
+    }
+
+    switch (time->type) {
+      case PS_TIME_TAI:
+        switch (type) {
+          case PS_TIME_UTC:
+            return convertTimeTAIUTC(time);
+          case PS_TIME_TT:
+            return convertTimeTAITT(time);
+          case PS_TIME_UT1:
+            convertTimeTAIUTC(time);
+            return convertTimeUTCUT1(time);
+          default:
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type);
+            return false;
+        }
+        break;
+      case PS_TIME_TT:
+        switch (type) {
+          case PS_TIME_UTC:
+            convertTimeTTTAI(time);
+            return convertTimeTAIUTC(time);
+          case PS_TIME_TAI:
+            return convertTimeTTTAI(time);
+          case PS_TIME_UT1:
+            convertTimeTTTAI(time);
+            convertTimeTAIUTC(time);
+            return convertTimeUTCUT1(time);
+          default:
             psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type);
             return NULL;
         }
-        // Convert from TT to TAI, UTC, UT1
-    } else if (time->type == PS_TIME_TT) {
-        // Convert from TT to UTC
-        if (type == PS_TIME_UTC) {
-            // Convert to TAI time first
-            time = convertTimeTTTAI(time);
-            // Convert from TAI to UTC
-            time = convertTimeTAIUTC(time);
-            // Convert from TT to TAI
-        } else if (type == PS_TIME_TAI) {
-            time = convertTimeTTTAI(time);
-            // Convert from TT to UT1
-        } else if (type == PS_TIME_UT1) {
-            // Convert to UTC first
-            // Convert to TAI time first
-            time = convertTimeTTTAI(time);
-            // Convert from TAI to UTC
-            time = convertTimeTAIUTC(time);
-            // Convert from UTC to UT1
-            time = convertTimeUTCUT1(time);
-            // Convert from TT to unknown time type
-        } else {
+        break;
+      case PS_TIME_UTC:
+        switch (type) {
+          case PS_TIME_TAI:
+            return convertTimeUTCTAI(time);
+          case PS_TIME_TT:
+            convertTimeUTCTAI(time);
+            return convertTimeTAITT(time);
+          case PS_TIME_UT1:
+            return convertTimeUTCUT1(time);
+          default:
             psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type);
             return NULL;
         }
-        // Convert from UTC to TAI, TT, UT1
-    } else if (time->type == PS_TIME_UTC) {
-        // Convert UTC to TAI
-        if (type == PS_TIME_TAI) {
-            time = convertTimeUTCTAI(time);
-            // Convert UTC to TT
-        } else if (type == PS_TIME_TT) {
-            // Convert to TAI time first
-            time = convertTimeUTCTAI(time);
-            // Convert TAI to TT
-            time = convertTimeTAITT(time);
-            // Convert UTC to UT1
-        } else if (type == PS_TIME_UT1) {
-            time = convertTimeUTCUT1(time);
-            // Convert UTC to unknown time type
-        } else {
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type);
-            return NULL;
-        }
-        // Convert unknown time type
-    } else {
+        break;
+      default:
         psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), time->type);
         return NULL;
     }
 
-    return time;
+    psAbort("Should never reach here.");
+    return false;
 }
 
@@ -792,5 +769,5 @@
     tdtTime->nsec = time->nsec;
     tdtTime->leapsecond = time->leapsecond;
-    tdtTime = psTimeConvert(tdtTime,PS_TIME_TT);
+    psTimeConvert(tdtTime,PS_TIME_TT);
 
     // Determine time reference to UT1
@@ -799,5 +776,5 @@
     ut1Time->nsec = time->nsec;
     ut1Time->leapsecond = time->leapsecond;
-    ut1Time = psTimeConvert(ut1Time,PS_TIME_UT1);
+    psTimeConvert(ut1Time,PS_TIME_UT1);
 
     // Calculate UT1 as Julian Centuries since J2000.0
@@ -996,5 +973,5 @@
     *out = *time;
     if (out->type != PS_TIME_UT1) {
-        out = psTimeConvert(out, PS_TIME_UT1);
+        psTimeConvert(out, PS_TIME_UT1);
     }
     //see if corrections include seconds or just nano-seconds
@@ -1291,5 +1268,5 @@
     //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) {
-        time2 = psTimeConvert(time2, PS_TIME_TAI);
+        psTimeConvert(time2, PS_TIME_TAI);
     }
 
@@ -1317,5 +1294,5 @@
     //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) {
-        time2 = psTimeConvert(time2, PS_TIME_TAI);
+        psTimeConvert(time2, PS_TIME_TAI);
     }
 
@@ -1771,5 +1748,5 @@
         tempTime->sec = time->sec;
         tempTime->nsec = time->nsec;
-        tempTime = psTimeConvert(tempTime, PS_TIME_TAI);
+        psTimeConvert(tempTime, PS_TIME_TAI);
         outTime = psTimeAlloc(PS_TIME_TAI);
     } else {
@@ -1789,5 +1766,5 @@
     // Convert result to same time type as input
     if (time->type == PS_TIME_UTC) {
-        outTime = psTimeConvert(outTime, PS_TIME_UTC);
+        psTimeConvert(outTime, PS_TIME_UTC);
     }
 
@@ -1823,5 +1800,5 @@
         tempTime1->sec = time1->sec;
         tempTime1->nsec = time1->nsec;
-        tempTime1 = psTimeConvert(tempTime1, PS_TIME_TAI);
+        psTimeConvert(tempTime1, PS_TIME_TAI);
     } else {
         tempTime1 = psMemIncrRefCounter((psTime*)time1);
@@ -1831,5 +1808,5 @@
         tempTime2->sec = time2->sec;
         tempTime2->nsec = time2->nsec;
-        tempTime2 = psTimeConvert(tempTime2, PS_TIME_TAI);
+        psTimeConvert(tempTime2, PS_TIME_TAI);
     } else {
         tempTime2 = psMemIncrRefCounter((psTime*)time2);
Index: trunk/psLib/src/astro/psTime.h
===================================================================
--- trunk/psLib/src/astro/psTime.h	(revision 22681)
+++ trunk/psLib/src/astro/psTime.h	(revision 22682)
@@ -135,9 +135,9 @@
 /** Convert psTime to UTC, TAI, UT1, or TT time.
  *
- *  Converts psTime to UTC, TAI, UT1, or TT time based on the psTimeType argument.
- *
- *  @return psTime*:    Pointer to psTime.
- */
-psTime* psTimeConvert(
+ *  Converts psTime in-place to UTC, TAI, UT1, or TT time based on the psTimeType argument.
+ *
+ *  @return bool: Successful conversion?
+ */
+bool psTimeConvert(
     psTime *time,                      ///< Time to be converted.
     psTimeType type                    ///< Type to be converted to.
