Ignore:
Timestamp:
Jul 5, 2002, 9:13:36 AM (23 years ago)
Author:
umoeller
Message:

Second round of fixes for 0.9.19.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/datetime.c

    r123 r184  
    8787                    &ulTimeNow,
    8888                    sizeof(ulTimeNow));
    89     return (ulTimeNow);
    90 
    91     /* DATETIME    dt;
    92     ULONG       ulHours,
    93                 ulDaysPassed = 0;
    94 
    95     if (G_ulDateScalarFirstCalled == 0)
    96     {
    97         // first call:
    98         G_ulDateScalarFirstCalled = dtDate2Scalar(dt.year,
    99                                                   dt.month,
    100                                                   dt.day);
    101     }
    102     else
    103     {
    104         // not first call:
    105         ULONG ulDateScalarNow = dtDate2Scalar(dt.year,
    106                                               dt.month,
    107                                               dt.day);
    108         ulDaysPassed = (ulDateScalarNow - G_ulDateScalarFirstCalled);
    109         _Pmpf((__FUNCTION__ ": days passed = %d", ulDaysPassed));
    110     }
    111 
    112     DosGetDateTime(&dt);
    113     ulHours = dt.hours;     // this is UCHAR in DATETIME
    114     // get the hours; for every day passed, add 24 hours...
    115     ulHours += (24 * ulDaysPassed);
    116             // 0 if we're still on the first date
    117 
    118     return (10*(dt.hundredths + 100*(dt.seconds + 60*(dt.minutes + 60*(ulHours))))); */
     89    return ulTimeNow;
    11990}
    12091
     
    150121                          FTIME* pftime)         // in: time
    151122{
    152     return (sprintf(pszTimeStamp,
    153                     pcszFormatTimestamp,
    154                     pfdate->year + 1980,
    155                     pfdate->month,
    156                     pfdate->day,
    157                     pftime->hours,
    158                     pftime->minutes,
    159                     pftime->twosecs * 2));
     123    return sprintf(pszTimeStamp,
     124                   pcszFormatTimestamp,
     125                   pfdate->year + 1980,
     126                   pfdate->month,
     127                   pfdate->day,
     128                   pftime->hours,
     129                   pftime->minutes,
     130                   pftime->twosecs * 2);
    160131}
    161132
     
    173144                         DATETIME* pdt)
    174145{
    175     return (sprintf(pszTimeStamp,
    176                     pcszFormatTimestamp,
    177                     pdt->year,
    178                     pdt->month,
    179                     pdt->day,
    180                     pdt->hours,
    181                     pdt->minutes,
    182                     pdt->seconds));
     146    return sprintf(pszTimeStamp,
     147                   pcszFormatTimestamp,
     148                   pdt->year,
     149                   pdt->month,
     150                   pdt->day,
     151                   pdt->hours,
     152                   pdt->minutes,
     153                   pdt->seconds);
    183154}
    184155
     
    372343                    if (day == 29)
    373344                        if (dtIsLeapYear(year))
    374                             return (TRUE);
     345                            return TRUE;
    375346        }
    376347    }
    377348
    378     return (FALSE);
    379 }
    380 
     349    return FALSE;
     350}
     351
Note: See TracChangeset for help on using the changeset viewer.