diff options
author | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2005-07-16 08:07:53 +0000 |
---|---|---|
committer | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2005-07-16 08:07:53 +0000 |
commit | 46d803d44ea8d04857284d280568e57b651a3a7f (patch) | |
tree | a298f9fb8910e4f72e1e755122d94e87d0440473 /time | |
parent | 773b674582007d5888ee0aa2b7f05b1c8601f205 (diff) | |
download | libapr-46d803d44ea8d04857284d280568e57b651a3a7f.tar.gz |
OS/2: Implement apr_file_mtime_set().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@219295 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r-- | time/unix/time.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index ffc0c697c..a4176631f 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -267,6 +267,23 @@ APR_DECLARE(apr_status_t) apr_os2_time_to_apr_time(apr_time_t *result, *result = mktime(&tmpdate) * APR_USEC_PER_SEC; return APR_SUCCESS; } + +APR_DECLARE(apr_status_t) apr_apr_time_to_os2_time(FDATE *os2date, + FTIME *os2time, + apr_time_t aprtime) +{ + time_t ansitime = aprtime / APR_USEC_PER_SEC; + struct tm *lt; + lt = localtime(&ansitime); + os2time->hours = lt->tm_hour; + os2time->minutes = lt->tm_min; + os2time->twosecs = lt->tm_sec / 2; + + os2date->day = lt->tm_mday; + os2date->month = lt->tm_mon + 1; + os2date->year = lt->tm_year - 80; + return APR_SUCCESS; +} #endif #ifdef NETWARE |