diff options
author | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2000-01-10 07:15:30 +0000 |
---|---|---|
committer | bjh <bjh@13f79535-47bb-0310-9956-ffa450edef68> | 2000-01-10 07:15:30 +0000 |
commit | 3aac65d9800b47c168f6d76d266b09a3b39325fb (patch) | |
tree | 8262fc3febe12a9e22fee640dbf813923cfb0b9e /time | |
parent | bfcde3574e10e52ec6633099dad59c621b27a0b0 (diff) | |
download | libapr-3aac65d9800b47c168f6d76d266b09a3b39325fb.tar.gz |
OS/2: Migrate directory API to new style ap_time_t
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59582 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'time')
-rw-r--r-- | time/unix/time.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index 844d0e55a..39202e8be 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -294,3 +294,27 @@ ap_status_t ap_put_os_exp_time(ap_exploded_time_t *aprtime, return APR_SUCCESS; } + + +#ifdef OS2 +#define INCL_DOS +#include <os2.h> + +ap_status_t ap_os2_time_to_ap_time(ap_time_t *result, FDATE os2date, FTIME os2time) +{ + struct tm tmpdate; + + memset(&tmpdate, 0, sizeof(tmpdate)); + tmpdate.tm_hour = os2time.hours; + tmpdate.tm_min = os2time.minutes; + tmpdate.tm_sec = os2time.twosecs * 2; + + tmpdate.tm_mday = os2date.day; + tmpdate.tm_mon = os2date.month - 1; + tmpdate.tm_year = os2date.year + 80; + tmpdate.tm_isdst = -1; + + *result = mktime(&tmpdate) * AP_USEC_PER_SEC; + return APR_SUCCESS; +} +#endif |