Index: trunk/psLib/src/astro/psTime.c
===================================================================
--- trunk/psLib/src/astro/psTime.c	(revision 7942)
+++ trunk/psLib/src/astro/psTime.c	(revision 7961)
@@ -10,6 +10,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.91 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-07-20 12:59:07 $
+ *  @version $Revision: 1.92 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-07-25 01:16:04 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1681,4 +1681,25 @@
 }
 
+psString psTimeStrftime(const psTime *time, const char *format)
+{
+    PS_ASSERT_PTR_NON_NULL(time, NULL);
+    PS_ASSERT_PTR_NON_NULL(format, NULL);
+
+    struct tm *tmTime = psTimeToTM(time);
+
+    psString s = psAlloc(MAX_TIME_STRING_LENGTH);
+    size_t size = strftime(s, MAX_TIME_STRING_LENGTH, format, tmTime);
+    psFree(tmTime);
+    // it's worth nothing that strftime() can zero without an error having
+    // occured don't believe it's worth supporting that edge case.  See
+    // strftime(3) for further details.
+    if (size == 0) {
+        psError(PS_ERR_UNKNOWN, true, "failed to stringify a psTime");
+        return NULL;
+    }
+
+    return s;
+}
+
 psTime* psTimeMath(const psTime *time,
                    double delta)
