Index: /trunk/psLib/src/astro/psTime.c
===================================================================
--- /trunk/psLib/src/astro/psTime.c	(revision 1223)
+++ /trunk/psLib/src/astro/psTime.c	(revision 1223)
@@ -0,0 +1,149 @@
+/** @file  psTime.c
+ *
+ *  @brief Definitions for time, time utilities, and conversion functions for use with psLib astronomy
+ *  functions.
+ *
+ *  A collection of functions are required by psLib to manipulate time data. These functions primarily consist
+ *  of conversions between specific time formats.  PSLib currently uses the UNIX timeval time system as the
+ *  base upon which International Atomic Time (TAI) time is calculated. All time conversion functions within
+ *  psLib, except those noted, are calculated in terms of TAI time, which is approxinmately 32 seconds faster
+ *  than UTC/timeval.
+ *
+ *  @author Ross Harman, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-15 19:02:13 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
+
+
+/******************************************************************************/
+/*  INCLUDE FILES                                                             */
+/******************************************************************************/
+
+#include <stdio.h>
+
+#include "psTime.h"
+#include "psError.h"
+
+/******************************************************************************/
+/*  DEFINE STATEMENTS                                                         */
+/******************************************************************************/
+
+// Number of available leapsecond updates
+#define NUM_LEAPSECOND_UPDATES 23
+
+/******************************************************************************/
+/*  TYPE DEFINITIONS                                                          */
+/******************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/*  GLOBAL VARIABLES                                                         */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/*  FILE STATIC VARIABLES                                                    */
+/*****************************************************************************/
+
+/* The table below comes from http://tycho.usno.navy.mil/leapsec.html, which reports the current state of
+the TAI/UTC leapsecond conversion times. This table is placed into a two dimensional array and used by
+the psTimeGetTime() function to calculate TAI time from  UTC time.
+ 
+ 1972 JAN  1 =JD 2441317.5  TAI-UTC=  10.0
+ 1972 JUL  1 =JD 2441499.5  TAI-UTC=  11.0
+ 1973 JAN  1 =JD 2441683.5  TAI-UTC=  12.0
+ 1974 JAN  1 =JD 2442048.5  TAI-UTC=  13.0
+ 1975 JAN  1 =JD 2442413.5  TAI-UTC=  14.0
+ 1976 JAN  1 =JD 2442778.5  TAI-UTC=  15.0
+ 1977 JAN  1 =JD 2443144.5  TAI-UTC=  16.0
+ 1978 JAN  1 =JD 2443509.5  TAI-UTC=  17.0
+ 1979 JAN  1 =JD 2443874.5  TAI-UTC=  18.0
+ 1980 JAN  1 =JD 2444239.5  TAI-UTC=  19.0
+ 1981 JUL  1 =JD 2444786.5  TAI-UTC=  20.0
+ 1982 JUL  1 =JD 2445151.5  TAI-UTC=  21.0
+ 1983 JUL  1 =JD 2445516.5  TAI-UTC=  22.0
+ 1985 JUL  1 =JD 2446247.5  TAI-UTC=  23.0
+ 1988 JAN  1 =JD 2447161.5  TAI-UTC=  24.0
+ 1990 JAN  1 =JD 2447892.5  TAI-UTC=  25.0
+ 1991 JAN  1 =JD 2448257.5  TAI-UTC=  26.0
+ 1992 JUL  1 =JD 2448804.5  TAI-UTC=  27.0
+ 1993 JUL  1 =JD 2449169.5  TAI-UTC=  28.0
+ 1994 JUL  1 =JD 2449534.5  TAI-UTC=  29.0
+ 1996 JAN  1 =JD 2450083.5  TAI-UTC=  30.0
+ 1997 JUL  1 =JD 2450630.5  TAI-UTC=  31.0
+ 1999 JAN  1 =JD 2451179.5  TAI-UTC=  32.0
+*/
+
+// Julian date of leapsecond update and current total number of leapseconds for that date
+static double leapseconds[NUM_LEAPSECOND_UPDATES][2] =
+    {
+        {2441317.5, 10.0},
+        {2441499.5, 11.0},
+        {2441683.5, 12.0},
+        {2442048.5, 13.0},
+        {2442413.5, 14.0},
+        {2442778.5, 15.0},
+        {2443144.5, 16.0},
+        {2443509.5, 17.0},
+        {2443874.5, 18.0},
+        {2444239.5, 19.0},
+        {2444786.5, 20.0},
+        {2445151.5, 21.0},
+        {2445516.5, 22.0},
+        {2446247.5, 23.0},
+        {2447161.5, 24.0},
+        {2447892.5, 25.0},
+        {2448257.5, 26.0},
+        {2448804.5, 27.0},
+        {2449169.5, 28.0},
+        {2449534.5, 29.0},
+        {2450083.5, 30.0},
+        {2450630.5, 31.0},
+        {2451179.5, 32.0}
+    };
+
+/*****************************************************************************/
+/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
+/*****************************************************************************/
+
+psTime psTimeGetTime(void)
+{
+    struct timeval now;
+    psTime time;
+
+    time.tv_sec = 0;
+    time.tv_usec = 0;
+
+    if(gettimeofday(&now,(struct timezone *) 0) == -1) {
+        psError(__func__, " : Line %d - Failed to get time", __LINE__);
+        return time;
+    }
+
+    // Convert timeval time to psTime
+    time.tv_sec = now.tv_sec;
+    time.tv_usec = now.tv_usec;
+
+    // Add last known leapseconds to UTC time to get TAI time
+    time.tv_sec += leapseconds[NUM_LEAPSECOND_UPDATES][1];
+
+    return time;
+}
+
+char* psTimeToISO(psTime time)
+{
+    struct tm *tm;
+    tm = localtime (&time.tv_sec);
+    printf("%d\n", tm->tm_sec);
+    return NULL;
+}
Index: /trunk/psLib/src/astro/psTime.h
===================================================================
--- /trunk/psLib/src/astro/psTime.h	(revision 1222)
+++ /trunk/psLib/src/astro/psTime.h	(revision 1223)
@@ -1,14 +1,17 @@
 /** @file  psTime.h
  *
- *  @brief Provides time and timing utilities for psLib.
+ *  @brief Definitions for time, time utilities, and conversion functions for use with psLib astronomy
+ *  functions.
  *
- *  Time, time utilities, and conversion functions are defined for use with psLib astronomy functions.
- *
- *  @ingroup Time
+ *  A collection of functions are required by psLib to manipulate time data. These functions primarily consist
+ *  of conversions between specific time formats.  PSLib currently uses the UNIX timeval time system as the
+ *  base upon which International Atomic Time (TAI) time is calculated. All time conversion functions within
+ *  psLib, except those noted, are calculated in terms of TAI time, which is approxinmately 32 seconds faster
+ *  than UTC/timeval.
  *
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-13 01:04:37 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-15 19:02:13 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -17,4 +20,10 @@
 #ifndef PSTIME_H
 #define PSTIME_H
+
+#include <time.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include "psType.h"
 
 /// @addtogroup Time
@@ -25,13 +34,14 @@
 /******************************************************************************/
 
-/** Struct containing psTime.
+/** Definition of psTime.
  *
- *  This struct defines current time in terms of seconds, nanoseconds, and attoseconds. 
+ *  The psTime struct is used by psLib to represent time values critical to astronomical calculations.  This
+ *  structure represents a time which is equivalent to TAI (International Atomic Time) and is measured in
+ *  both seconds and microseconds.
  */
 typedef struct
 {
-    long tv_sec;    /**< Seconds since epoch, Jan 1, 1970. */
-    long tv_nsec;   /**< Nanoseconds since last second. */
-    long tv_asec;   /**< Attoseconds since last nanosecond. */
+    time_t        tv_sec;    /**< Seconds since epoch, Jan 1, 1970. */
+    suseconds_t   tv_usec;   /**< Microseconds since last second. */
 }
 psTime;
@@ -41,34 +51,123 @@
 /*****************************************************************************/
 
-/** Get current UTC time.
+/** Get current TAI time.
  *
- * Gets current UTC timespec time.
+ * Gets current time from the system clock in correct TAI units.
  *
- *  @return  psTime*: Pointer to struct with current time.
+ *  @return  psTime: Struct with current time.
  */
-psTime* psGetTime(
-    psTime *time    /** Time to return or null for auto allocation. */
+psTime psTimeGetTime(
+    void   /** No argument. */
 );
 
-/** Convert psTime to ISO time.
+/** Convert psTime to ISO time in TAI units.
  *
- * Converts psTime to a null terminated string in the form of: YYYY/MM/DD,HH:MM:SS.SSS.
+ * Converts psTime to a null terminated string in the form of: YYYY/MM/DD,HH:MM:SS.SSS. The result from this
+ * function is in TAI units.
  *
- *  @return  char*: Pointer null terminated array of chars.
+ *  @return  char*: Pointer null terminated array of chars in ISO/TAI time.
  */
-char* psTimeToISOTime(
-    psTime *time    /** Input time to be converted. */
+char* psTimeToISO(
+    psTime time     /** Input time to be converted. */
 );
 
 /** Convert psTime to UTC time.
  *
- * Converts psTime to UTC time in double precision floating point notation.
+ * Converts psTime to UTC time in double precision floating point notation. The result from this function is
+ * not in TAI units, but that of UTC, which does not contain leapseconds.
  *
  *  @return  double: UTC time in floating point notation.
  */
-double psTimeToISOTime(
-    psTime *time    /** Input time to be converted. */
+double psTimeToUTC(
+    psTime time    /** Input time to be converted. */
 );
 
+/** Convert psTime to modified Julian date time.
+ *
+ * Converts psTime to modified Julian date (MJD) time. The result from this function is in TAI units.
+ *
+ *  @return  double: MJD/TAI time in floating point notation.
+ */
+double psTimeToMJD(
+    psTime time    /** Input time to be converted. */
+);
+
+/** Convert psTime to Julian date time.
+ *
+ * Converts psTime to Julian date (JD) time. The result from this function is in TAI units.
+ *
+ *  @return  double: JD/TAI time in floating point notation.
+ */
+double psTimeToJD(
+    psTime time    /** Input time to be converted. */
+);
+
+/** Convert psTime to timeval time.
+ *
+ * Converts psTime to timeval time. The result from this function is in TAI units.
+ *
+ *  @return  timeval: timeval/TAI time.
+ */
+struct timeval psTimeToTimeval(
+                psTime time    /** Input time to be converted. */
+            );
+
+/** Convert psTime to tm time.
+ *
+ * Converts psTime to tm time. The result from this function is in TAI units.
+ *
+ *  @return  tm: tm/TAI time.
+ */
+struct tm* psTimeToTM(
+                psTime time    /** Input time to be converted. */
+            );
+
+/** Convert ISO to psTime.
+ *
+ * Converts ISO time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psISOToTime(char *time);
+
+/** Convert UTC to psTime.
+ *
+ * Converts UTC time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psUTCToTime(double time);
+
+/** Convert MJD to psTime.
+ *
+ * Converts MJD time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psMJDToTime(double time);
+
+/** Convert JD to psTime.
+ *
+ * Converts JD time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psJDToTime(double time);
+
+/** Convert timeval to psTime.
+ *
+ * Converts timeval time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psTimevalToTime(struct timeval *time);
+
+/** Convert tm time to psTime.
+ *
+ * Converts tm time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psTMToTime(struct tm *time);
 /// @}
 
Index: /trunk/psLib/src/astronomy/Makefile
===================================================================
--- /trunk/psLib/src/astronomy/Makefile	(revision 1222)
+++ /trunk/psLib/src/astronomy/Makefile	(revision 1223)
@@ -7,5 +7,5 @@
 CFLAGS := $(CFLAGS_RELOC) -I. -I../sysUtils -I../collections -I..
 
-SRC_OBJS = 
+SRC_OBJS = psTime.o
 
 all: $(TARGET_STATIC)
Index: /trunk/psLib/src/astronomy/psTime.c
===================================================================
--- /trunk/psLib/src/astronomy/psTime.c	(revision 1223)
+++ /trunk/psLib/src/astronomy/psTime.c	(revision 1223)
@@ -0,0 +1,149 @@
+/** @file  psTime.c
+ *
+ *  @brief Definitions for time, time utilities, and conversion functions for use with psLib astronomy
+ *  functions.
+ *
+ *  A collection of functions are required by psLib to manipulate time data. These functions primarily consist
+ *  of conversions between specific time formats.  PSLib currently uses the UNIX timeval time system as the
+ *  base upon which International Atomic Time (TAI) time is calculated. All time conversion functions within
+ *  psLib, except those noted, are calculated in terms of TAI time, which is approxinmately 32 seconds faster
+ *  than UTC/timeval.
+ *
+ *  @author Ross Harman, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-15 19:02:13 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
+
+
+/******************************************************************************/
+/*  INCLUDE FILES                                                             */
+/******************************************************************************/
+
+#include <stdio.h>
+
+#include "psTime.h"
+#include "psError.h"
+
+/******************************************************************************/
+/*  DEFINE STATEMENTS                                                         */
+/******************************************************************************/
+
+// Number of available leapsecond updates
+#define NUM_LEAPSECOND_UPDATES 23
+
+/******************************************************************************/
+/*  TYPE DEFINITIONS                                                          */
+/******************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/*  GLOBAL VARIABLES                                                         */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/*  FILE STATIC VARIABLES                                                    */
+/*****************************************************************************/
+
+/* The table below comes from http://tycho.usno.navy.mil/leapsec.html, which reports the current state of
+the TAI/UTC leapsecond conversion times. This table is placed into a two dimensional array and used by
+the psTimeGetTime() function to calculate TAI time from  UTC time.
+ 
+ 1972 JAN  1 =JD 2441317.5  TAI-UTC=  10.0
+ 1972 JUL  1 =JD 2441499.5  TAI-UTC=  11.0
+ 1973 JAN  1 =JD 2441683.5  TAI-UTC=  12.0
+ 1974 JAN  1 =JD 2442048.5  TAI-UTC=  13.0
+ 1975 JAN  1 =JD 2442413.5  TAI-UTC=  14.0
+ 1976 JAN  1 =JD 2442778.5  TAI-UTC=  15.0
+ 1977 JAN  1 =JD 2443144.5  TAI-UTC=  16.0
+ 1978 JAN  1 =JD 2443509.5  TAI-UTC=  17.0
+ 1979 JAN  1 =JD 2443874.5  TAI-UTC=  18.0
+ 1980 JAN  1 =JD 2444239.5  TAI-UTC=  19.0
+ 1981 JUL  1 =JD 2444786.5  TAI-UTC=  20.0
+ 1982 JUL  1 =JD 2445151.5  TAI-UTC=  21.0
+ 1983 JUL  1 =JD 2445516.5  TAI-UTC=  22.0
+ 1985 JUL  1 =JD 2446247.5  TAI-UTC=  23.0
+ 1988 JAN  1 =JD 2447161.5  TAI-UTC=  24.0
+ 1990 JAN  1 =JD 2447892.5  TAI-UTC=  25.0
+ 1991 JAN  1 =JD 2448257.5  TAI-UTC=  26.0
+ 1992 JUL  1 =JD 2448804.5  TAI-UTC=  27.0
+ 1993 JUL  1 =JD 2449169.5  TAI-UTC=  28.0
+ 1994 JUL  1 =JD 2449534.5  TAI-UTC=  29.0
+ 1996 JAN  1 =JD 2450083.5  TAI-UTC=  30.0
+ 1997 JUL  1 =JD 2450630.5  TAI-UTC=  31.0
+ 1999 JAN  1 =JD 2451179.5  TAI-UTC=  32.0
+*/
+
+// Julian date of leapsecond update and current total number of leapseconds for that date
+static double leapseconds[NUM_LEAPSECOND_UPDATES][2] =
+    {
+        {2441317.5, 10.0},
+        {2441499.5, 11.0},
+        {2441683.5, 12.0},
+        {2442048.5, 13.0},
+        {2442413.5, 14.0},
+        {2442778.5, 15.0},
+        {2443144.5, 16.0},
+        {2443509.5, 17.0},
+        {2443874.5, 18.0},
+        {2444239.5, 19.0},
+        {2444786.5, 20.0},
+        {2445151.5, 21.0},
+        {2445516.5, 22.0},
+        {2446247.5, 23.0},
+        {2447161.5, 24.0},
+        {2447892.5, 25.0},
+        {2448257.5, 26.0},
+        {2448804.5, 27.0},
+        {2449169.5, 28.0},
+        {2449534.5, 29.0},
+        {2450083.5, 30.0},
+        {2450630.5, 31.0},
+        {2451179.5, 32.0}
+    };
+
+/*****************************************************************************/
+/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
+/*****************************************************************************/
+
+psTime psTimeGetTime(void)
+{
+    struct timeval now;
+    psTime time;
+
+    time.tv_sec = 0;
+    time.tv_usec = 0;
+
+    if(gettimeofday(&now,(struct timezone *) 0) == -1) {
+        psError(__func__, " : Line %d - Failed to get time", __LINE__);
+        return time;
+    }
+
+    // Convert timeval time to psTime
+    time.tv_sec = now.tv_sec;
+    time.tv_usec = now.tv_usec;
+
+    // Add last known leapseconds to UTC time to get TAI time
+    time.tv_sec += leapseconds[NUM_LEAPSECOND_UPDATES][1];
+
+    return time;
+}
+
+char* psTimeToISO(psTime time)
+{
+    struct tm *tm;
+    tm = localtime (&time.tv_sec);
+    printf("%d\n", tm->tm_sec);
+    return NULL;
+}
Index: /trunk/psLib/src/astronomy/psTime.h
===================================================================
--- /trunk/psLib/src/astronomy/psTime.h	(revision 1222)
+++ /trunk/psLib/src/astronomy/psTime.h	(revision 1223)
@@ -1,14 +1,17 @@
 /** @file  psTime.h
  *
- *  @brief Provides time and timing utilities for psLib.
+ *  @brief Definitions for time, time utilities, and conversion functions for use with psLib astronomy
+ *  functions.
  *
- *  Time, time utilities, and conversion functions are defined for use with psLib astronomy functions.
- *
- *  @ingroup Time
+ *  A collection of functions are required by psLib to manipulate time data. These functions primarily consist
+ *  of conversions between specific time formats.  PSLib currently uses the UNIX timeval time system as the
+ *  base upon which International Atomic Time (TAI) time is calculated. All time conversion functions within
+ *  psLib, except those noted, are calculated in terms of TAI time, which is approxinmately 32 seconds faster
+ *  than UTC/timeval.
  *
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-13 01:04:37 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-15 19:02:13 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -17,4 +20,10 @@
 #ifndef PSTIME_H
 #define PSTIME_H
+
+#include <time.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include "psType.h"
 
 /// @addtogroup Time
@@ -25,13 +34,14 @@
 /******************************************************************************/
 
-/** Struct containing psTime.
+/** Definition of psTime.
  *
- *  This struct defines current time in terms of seconds, nanoseconds, and attoseconds. 
+ *  The psTime struct is used by psLib to represent time values critical to astronomical calculations.  This
+ *  structure represents a time which is equivalent to TAI (International Atomic Time) and is measured in
+ *  both seconds and microseconds.
  */
 typedef struct
 {
-    long tv_sec;    /**< Seconds since epoch, Jan 1, 1970. */
-    long tv_nsec;   /**< Nanoseconds since last second. */
-    long tv_asec;   /**< Attoseconds since last nanosecond. */
+    time_t        tv_sec;    /**< Seconds since epoch, Jan 1, 1970. */
+    suseconds_t   tv_usec;   /**< Microseconds since last second. */
 }
 psTime;
@@ -41,34 +51,123 @@
 /*****************************************************************************/
 
-/** Get current UTC time.
+/** Get current TAI time.
  *
- * Gets current UTC timespec time.
+ * Gets current time from the system clock in correct TAI units.
  *
- *  @return  psTime*: Pointer to struct with current time.
+ *  @return  psTime: Struct with current time.
  */
-psTime* psGetTime(
-    psTime *time    /** Time to return or null for auto allocation. */
+psTime psTimeGetTime(
+    void   /** No argument. */
 );
 
-/** Convert psTime to ISO time.
+/** Convert psTime to ISO time in TAI units.
  *
- * Converts psTime to a null terminated string in the form of: YYYY/MM/DD,HH:MM:SS.SSS.
+ * Converts psTime to a null terminated string in the form of: YYYY/MM/DD,HH:MM:SS.SSS. The result from this
+ * function is in TAI units.
  *
- *  @return  char*: Pointer null terminated array of chars.
+ *  @return  char*: Pointer null terminated array of chars in ISO/TAI time.
  */
-char* psTimeToISOTime(
-    psTime *time    /** Input time to be converted. */
+char* psTimeToISO(
+    psTime time     /** Input time to be converted. */
 );
 
 /** Convert psTime to UTC time.
  *
- * Converts psTime to UTC time in double precision floating point notation.
+ * Converts psTime to UTC time in double precision floating point notation. The result from this function is
+ * not in TAI units, but that of UTC, which does not contain leapseconds.
  *
  *  @return  double: UTC time in floating point notation.
  */
-double psTimeToISOTime(
-    psTime *time    /** Input time to be converted. */
+double psTimeToUTC(
+    psTime time    /** Input time to be converted. */
 );
 
+/** Convert psTime to modified Julian date time.
+ *
+ * Converts psTime to modified Julian date (MJD) time. The result from this function is in TAI units.
+ *
+ *  @return  double: MJD/TAI time in floating point notation.
+ */
+double psTimeToMJD(
+    psTime time    /** Input time to be converted. */
+);
+
+/** Convert psTime to Julian date time.
+ *
+ * Converts psTime to Julian date (JD) time. The result from this function is in TAI units.
+ *
+ *  @return  double: JD/TAI time in floating point notation.
+ */
+double psTimeToJD(
+    psTime time    /** Input time to be converted. */
+);
+
+/** Convert psTime to timeval time.
+ *
+ * Converts psTime to timeval time. The result from this function is in TAI units.
+ *
+ *  @return  timeval: timeval/TAI time.
+ */
+struct timeval psTimeToTimeval(
+                psTime time    /** Input time to be converted. */
+            );
+
+/** Convert psTime to tm time.
+ *
+ * Converts psTime to tm time. The result from this function is in TAI units.
+ *
+ *  @return  tm: tm/TAI time.
+ */
+struct tm* psTimeToTM(
+                psTime time    /** Input time to be converted. */
+            );
+
+/** Convert ISO to psTime.
+ *
+ * Converts ISO time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psISOToTime(char *time);
+
+/** Convert UTC to psTime.
+ *
+ * Converts UTC time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psUTCToTime(double time);
+
+/** Convert MJD to psTime.
+ *
+ * Converts MJD time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psMJDToTime(double time);
+
+/** Convert JD to psTime.
+ *
+ * Converts JD time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psJDToTime(double time);
+
+/** Convert timeval to psTime.
+ *
+ * Converts timeval time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psTimevalToTime(struct timeval *time);
+
+/** Convert tm time to psTime.
+ *
+ * Converts tm time to psTime. The result from this function is in TAI units.
+ *
+ *  @return  psTime: time in TAI units.
+ */
+psTime psTMToTime(struct tm *time);
 /// @}
 
Index: /trunk/psLib/test/astronomy/Makefile
===================================================================
--- /trunk/psLib/test/astronomy/Makefile	(revision 1223)
+++ /trunk/psLib/test/astronomy/Makefile	(revision 1223)
@@ -0,0 +1,72 @@
+################################################################################
+##
+##  Makefile:   test/astronomy
+##
+##  $Revision: 1.1 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-07-15 19:00:29 $
+##
+##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+##
+###############################################################################
+
+ifndef prefix
+    export prefix=$(shell cd ../..;pwd)
+endif
+
+include ../../src/Makefile.Globals
+
+PSLIB_INCL_DIR = ../../include
+
+PSLIB_LIB_DIR = ../../lib
+
+TARGET = tst_psTime_01
+
+DEPENDENCIES = $(addprefix builddir/,$(addsuffix .d,$(TARGET)))
+OBJS = $(addprefix builddir/,$(addsuffix .o,$(TARGET)))
+
+all: builddir $(TARGET)
+
+builddir:
+	mkdir builddir
+
+include $(DEPENDENCIES)
+
+clean:
+	@echo "    Deleting executable and binary files for 'test/astronomy'"
+	$(RM) $(OBJS) *.lint builddir/*.i
+
+distclean: clean
+	$(RM) $(TARGET)
+
+cleandependencies:
+	$(RM) $(DEPENDENCIES)
+
+builddir/%.o : builddir/%.i
+	$(CC) $(CFLAGS) -I$(PSLIB_INCL_DIR) -c -o $@ $<
+
+builddir/%.o : %.c
+	$(CC) $(CFLAGS) -I$(PSLIB_INCL_DIR) -c -o $@ $<
+
+%   : builddir/%.o
+	$(CC) -o $@ $< -L$(PSLIB_LIB_DIR) -lpslib -lpstest $(LDFLAGS)
+
+%.lint: %.c
+	splint +posixlib -exportlocal -realcompare $(INCLUDE_GLOBAL) $? > $@; cat $@
+
+builddir/%.i: %.c
+	$(CC) -E $(CFLAGS) $(CPPFLAGS) -I$(PSLIB_INCL_DIR) -o $@ $<
+
+builddir/%.d: %.c
+	$(CC) -MM $(CFLAGS) -I$(PSLIB_INCL_DIR) $< | sed 's|\(.*\.o\)|builddir/\1|' > $@
+
+install: $(testbindir) $(testbindir)/verified $(TARGET)
+	install $(TARGET) $(testbindir)
+	install verified/*.stderr verified/*.stdout $(testbindir)/verified
+
+$(testbindir):
+	mkdir -p $(testbindir)
+
+$(testbindir)/verified:
+	mkdir -p $(testbindir)/verified
+
+
Index: /trunk/psLib/test/astronomy/builddir/tst_psTime_01.d
===================================================================
--- /trunk/psLib/test/astronomy/builddir/tst_psTime_01.d	(revision 1223)
+++ /trunk/psLib/test/astronomy/builddir/tst_psTime_01.d	(revision 1223)
@@ -0,0 +1,12 @@
+builddir/tst_psTime_01.o: tst_psTime_01.c ../../include/pslib.h \
+  ../../include/psMemory.h ../../include/psLogMsg.h \
+  ../../include/psTrace.h ../../include/psAbort.h ../../include/psError.h \
+  ../../include/psString.h ../../include/psType.h ../../include/psList.h \
+  ../../include/psCompare.h ../../include/psVector.h \
+  ../../include/psHash.h ../../include/psScalar.h ../../include/psImage.h \
+  ../../include/psBitSet.h ../../include/psSort.h ../../include/psStats.h \
+  ../../include/psMatrix.h ../../include/psMatrixVectorArithmetic.h \
+  ../../include/psFFT.h ../../include/psImageIO.h \
+  ../../include/psImageManip.h ../../include/psFunctions.h \
+  ../../include/psMinimize.h ../../include/psTime.h \
+  ../../include/psTest.h
Index: /trunk/psLib/test/astronomy/tst_psTime_01.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psTime_01.c	(revision 1223)
+++ /trunk/psLib/test/astronomy/tst_psTime_01.c	(revision 1223)
@@ -0,0 +1,34 @@
+/** @file  tst_psTime_01.c
+ *
+ *  @brief Test driver for psTime functions
+ *
+ *  This test driver contains the following tests for psTime:
+ *     A)  
+ *     B)  
+ *     C)  
+ *     D)  
+ *     E)  
+ *     F)  
+ *     G)  
+ *     H)  
+ *     I)  
+ *     J)  
+ *
+ *  @author  Ross Harman, MHPCC
+ *
+ *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-07-15 19:00:29 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ *
+ */
+
+#include "pslib.h"
+#include "psTest.h"
+
+int main(int argc, char* argv[])
+{
+
+
+    return 0;
+}
