IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3705


Ignore:
Timestamp:
Apr 18, 2005, 1:30:54 PM (21 years ago)
Author:
evanalst
Message:

Change function names from psTimeToISOTime and psTimeFromISOTime to
psTimeToISO and psTimeFromISO respectively. (SDR-13)

Location:
trunk/psLib
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psTime.c

    r3704 r3705  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-04-18 23:13:37 $
     12 *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-04-18 23:30:54 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    812812}
    813813
    814 char* psTimeToISOTime(const psTime *time)
     814char* psTimeToISO(const psTime *time)
    815815{
    816816    psS32 ms = 0;
     
    979979}
    980980
    981 psTime* psTimeFromISOTime(const char *time)
     981psTime* psTimeFromISO(const char *time)
    982982{
    983983    psS32 millisecond;
  • trunk/psLib/src/astro/psTime.h

    r3704 r3705  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-04-18 23:13:37 $
     12 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-04-18 23:30:54 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    186186 *  @return  char*: Pointer null terminated array of chars in ISO time.
    187187 */
    188 char* psTimeToISOTime(
     188char* psTimeToISO(
    189189    const psTime* time                  ///< Input time to be converted.
    190190);
     
    237237 *  @return  psTime*: time
    238238 */
    239 psTime* psTimeFromISOTime(
     239psTime* psTimeFromISO(
    240240    const char* time                    ///< Input time to be converted.
    241241);
  • trunk/psLib/src/astronomy/psTime.c

    r3704 r3705  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-04-18 23:13:37 $
     12 *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-04-18 23:30:54 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    812812}
    813813
    814 char* psTimeToISOTime(const psTime *time)
     814char* psTimeToISO(const psTime *time)
    815815{
    816816    psS32 ms = 0;
     
    979979}
    980980
    981 psTime* psTimeFromISOTime(const char *time)
     981psTime* psTimeFromISO(const char *time)
    982982{
    983983    psS32 millisecond;
  • trunk/psLib/src/astronomy/psTime.h

    r3704 r3705  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-04-18 23:13:37 $
     12 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-04-18 23:30:54 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    186186 *  @return  char*: Pointer null terminated array of chars in ISO time.
    187187 */
    188 char* psTimeToISOTime(
     188char* psTimeToISO(
    189189    const psTime* time                  ///< Input time to be converted.
    190190);
     
    237237 *  @return  psTime*: time
    238238 */
    239 psTime* psTimeFromISOTime(
     239psTime* psTimeFromISO(
    240240    const char* time                    ///< Input time to be converted.
    241241);
  • trunk/psLib/test/astronomy/tst_psTime_01.c

    r3682 r3705  
    2323 *  @author  Ross Harman, MHPCC
    2424 *
    25  *  @version $Revision: 1.21 $  $Name: not supported by cvs2svn $
    26  *  @date  $Date: 2005-04-07 20:27:41 $
     25 *  @version $Revision: 1.22 $  $Name: not supported by cvs2svn $
     26 *  @date  $Date: 2005-04-18 23:30:54 $
    2727 *
    2828 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6666    printPositiveTestHeader(stdout,"psTime", "Convert psTime to ISO time");
    6767    char *isoString;
    68     isoString = psTimeToISOTime(testTime);
     68    isoString = psTimeToISO(testTime);
    6969    printf("%s\n", isoString);
    7070    if(strncmp(isoString, testString, 256)) {
     
    7878    printPositiveTestHeader(stdout,"psTime", "Convert ISO time to psTime");
    7979    psTime *timeD = NULL;
    80     timeD = psTimeFromISOTime(isoString);
     80    timeD = psTimeFromISO(isoString);
    8181    printf("psTime: Seconds = %lld Microseconds = %u\n",
    8282           (long long int)timeD->sec,
     
    206206    char *testString2 = "2004-09-10T1:00:00.00Z";
    207207    psTime* testTime2 = NULL;
    208     testTime2 = psTimeFromISOTime(testString2);
     208    testTime2 = psTimeFromISO(testString2);
    209209    double dblTime = psTimeToLST(testTime2, 1);
    210210    printf("LST (rad): %lf\n", dblTime);
  • trunk/psLib/test/astronomy/tst_psTime_02.c

    r3682 r3705  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.10 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2005-04-07 20:27:41 $
     12 *  @version $Revision: 1.11 $  $Name: not supported by cvs2svn $
     13 *  @date  $Date: 2005-04-18 23:30:54 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525    // Test A - Incorrect ISO time data
    2626    printNegativeTestHeader(stdout,"psTime", "Incorrect ISO time data", "Time not allowed", 0);
    27     psTimeFromISOTime("2004-99-21T18:22:24.272Z");
    28     psTimeFromISOTime("2004-07-99T18:22:24.272Z");
    29     psTimeFromISOTime("2004-07-21T99:22:24.272Z");
    30     psTimeFromISOTime("2004-07-21T18:99:24.272Z");
    31     psTimeFromISOTime("2004-07-21T18:22:99.272Z");
    32     psTimeFromISOTime("2004-07-21T18:22:24.-999Z");
     27    psTimeFromISO("2004-99-21T18:22:24.272Z");
     28    psTimeFromISO("2004-07-99T18:22:24.272Z");
     29    psTimeFromISO("2004-07-21T99:22:24.272Z");
     30    psTimeFromISO("2004-07-21T18:99:24.272Z");
     31    psTimeFromISO("2004-07-21T18:22:99.272Z");
     32    psTimeFromISO("2004-07-21T18:22:24.-999Z");
    3333    printFooter(stdout, "psTime", "Incorrect ISO time data", true);
    3434
  • trunk/psLib/test/astronomy/tst_psTime_03.c

    r3704 r3705  
    1919 *  @author  Ross Harman, MHPCC
    2020 *
    21  *  @version $Revision: 1.14 $  $Name: not supported by cvs2svn $
    22  *  @date  $Date: 2005-04-18 23:13:39 $
     21 *  @version $Revision: 1.15 $  $Name: not supported by cvs2svn $
     22 *  @date  $Date: 2005-04-18 23:30:54 $
    2323 *
    2424 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    155155    psTime *time7a = NULL;
    156156    psTime *timeOut7 = NULL;
    157     time7a = psTimeFromISOTime("1998-12-31T23:59:45.00");
     157    time7a = psTimeFromISO("1998-12-31T23:59:45.00");
    158158    time7a->type = PS_TIME_UTC;
    159159    timeOut7 = psTimeMath(time7a, time7b);
    160     out7 = psTimeToISOTime(timeOut7);
     160    out7 = psTimeToISO(timeOut7);
    161161    printf("%s\n", out7);
    162162    printFooter(stdout, "psTime", "Test G - Add two times across leapsecond boundary", true);
     
    168168    psTime *time8a = NULL;
    169169    psTime *time8b = NULL;
    170     time8a = psTimeFromISOTime("2004-12-18T1:00:00.00");
    171     time8b = psTimeFromISOTime("1972-1-1T1:00:00.00");
     170    time8a = psTimeFromISO("2004-12-18T1:00:00.00");
     171    time8b = psTimeFromISO("1972-1-1T1:00:00.00");
    172172    out = psTimeLeapSecondDelta(time8a, time8b);
    173173    printf("%lld\n", (long long int)out);
  • trunk/psLib/test/astronomy/verified/tst_psTime_02.stderr

    r3127 r3705  
    1 <DATE><TIME>|<HOST>|E|psTimeFromISOTime (FILE:LINENO)
     1<DATE><TIME>|<HOST>|E|psTimeFromISO (FILE:LINENO)
    22    Error: tmTime.tm_mon, 99, is out of range.  Must be between 1 and 12.
    3 <DATE><TIME>|<HOST>|E|psTimeFromISOTime (FILE:LINENO)
     3<DATE><TIME>|<HOST>|E|psTimeFromISO (FILE:LINENO)
    44    Error: tmTime.tm_mday, 99, is out of range.  Must be between 1 and 31.
    5 <DATE><TIME>|<HOST>|E|psTimeFromISOTime (FILE:LINENO)
     5<DATE><TIME>|<HOST>|E|psTimeFromISO (FILE:LINENO)
    66    Error: tmTime.tm_hour, 99, is out of range.  Must be between 0 and 23.
    7 <DATE><TIME>|<HOST>|E|psTimeFromISOTime (FILE:LINENO)
     7<DATE><TIME>|<HOST>|E|psTimeFromISO (FILE:LINENO)
    88    Error: tmTime.tm_min, 99, is out of range.  Must be between 0 and 59.
    9 <DATE><TIME>|<HOST>|E|psTimeFromISOTime (FILE:LINENO)
     9<DATE><TIME>|<HOST>|E|psTimeFromISO (FILE:LINENO)
    1010    Error: tmTime.tm_sec, 99, is out of range.  Must be between 0 and 59.
    11 <DATE><TIME>|<HOST>|E|psTimeFromISOTime (FILE:LINENO)
     11<DATE><TIME>|<HOST>|E|psTimeFromISO (FILE:LINENO)
    1212    Error: millisecond, -999, is out of range.  Must be between 0 and 999.
    1313<DATE><TIME>|<HOST>|E|psTimeFromTimeval (FILE:LINENO)
Note: See TracChangeset for help on using the changeset viewer.