diff options
Diffstat (limited to 'time')
-rw-r--r-- | time/unix/time.c | 8 | ||||
-rw-r--r-- | time/win32/time.c | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index 085c9aa8d..a39ca75a8 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -193,6 +193,14 @@ apr_status_t apr_implode_time(apr_time_t *t, apr_exploded_time_t *xt) return APR_SUCCESS; } +apr_status_t apr_implode_gmt(apr_time_t *t, apr_exploded_time_t *xt) +{ + apr_status_t status = apr_implode_time(t, xt); + if (status == APR_SUCCESS) + *t -= (apr_time_t) xt->tm_gmtoff * APR_USEC_PER_SEC; + return status; +} + apr_status_t apr_os_imp_time_get(apr_os_imp_time_t **ostime, apr_time_t *aprtime) { (*ostime)->tv_usec = *aprtime % APR_USEC_PER_SEC; diff --git a/time/win32/time.c b/time/win32/time.c index 18356de10..a82374918 100644 --- a/time/win32/time.c +++ b/time/win32/time.c @@ -210,6 +210,15 @@ APR_DECLARE(apr_status_t) apr_implode_time(apr_time_t *t, return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_implode_gmt(apr_time_t *t, + apr_exploded_time_t *xt) +{ + apr_status_t status = apr_implode_time(t, xt); + if (status == APR_SUCCESS) + *t -= (apr_time_t) xt->tm_gmtoff * APR_USEC_PER_SEC; + return status; +} + APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime, apr_time_t *aprtime) { |