IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 13, 2004, 1:47:10 PM (22 years ago)
Author:
desonia
Message:

changes to make it work on MAC OSX

File:
1 edited

Legend:

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

    r1407 r1533  
    1313 *  @author Ross Harman, MHPCC
    1414 *
    15  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2004-08-07 00:06:06 $
     15 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2004-08-13 23:47:10 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    221221    char *tempString = NULL;
    222222    struct tm *tmTime = NULL;
     223    time_t sec;
    223224
    224225    CHECK_NEGATIVE_TIME_STRUCT(time, NULL);
     
    230231    ms = time.tv_usec / 1000;
    231232
     233    sec = time.tv_sec;
    232234    // tmTime variable is statically allocated, no need to free
    233     tmTime = gmtime(&time.tv_sec);
     235    tmTime = gmtime(&sec);
    234236    if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) {
    235237        psError(__func__, " : Line %d - Failed strftime conversion", __LINE__);
     
    309311{
    310312    struct tm *tmTime = NULL;
     313    time_t sec;
    311314
    312315    CHECK_NEGATIVE_TIME_STRUCT(time, tmTime);
    313     tmTime = gmtime(&time.tv_sec);
     316    sec = time.tv_sec;
     317    tmTime = gmtime(&sec);
    314318
    315319    return tmTime;
Note: See TracChangeset for help on using the changeset viewer.