You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2001/06/06 20:59:28 UTC

cvs commit: apr/time/win32 time.c

wrowe       01/06/06 11:59:28

  Modified:    time/win32 time.c
  Log:
    Something is still broken with the testtime, but this gets us building.
  
  Revision  Changes    Path
  1.23      +13 -0     apr/time/win32/time.c
  
  Index: time.c
  ===================================================================
  RCS file: /home/cvs/apr/time/win32/time.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- time.c	2001/04/02 21:53:59	1.22
  +++ time.c	2001/06/06 18:59:25	1.23
  @@ -148,6 +148,19 @@
       return APR_SUCCESS;
   }
   
  +APR_DECLARE(apr_status_t) apr_explode_time(apr_exploded_time_t *result, 
  +                                           apr_time_t input, apr_int32_t offs)
  +{
  +    FILETIME ft;
  +    SYSTEMTIME st;
  +    AprTimeToFileTime(&ft, input + (offs *  APR_USEC_PER_SEC));
  +    FileTimeToSystemTime(&ft, &st);
  +    SystemTimeToAprExpTime(result, &st, 0);
  +    result->tm_usec = (apr_int32_t) (input % APR_USEC_PER_SEC);
  +    result->tm_gmtoff = offs;
  +    return APR_SUCCESS;
  +}
  +
   APR_DECLARE(apr_status_t) apr_explode_localtime(apr_exploded_time_t *result,
                                                   apr_time_t input)
   {