From a9886895f12c87858ab0c9f1d1f7af05f5f4d595 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 21 Jul 2008 13:12:22 +0000 Subject: [PATCH] add patch from FSCORE-160 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9118 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_apr.h | 7 +++++++ src/switch_apr.c | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/include/switch_apr.h b/src/include/switch_apr.h index 4434bdf720..81b7207879 100644 --- a/src/include/switch_apr.h +++ b/src/include/switch_apr.h @@ -302,6 +302,13 @@ SWITCH_DECLARE(switch_status_t) switch_time_exp_get(switch_time_t *result, switc */ SWITCH_DECLARE(switch_status_t) switch_time_exp_lt(switch_time_exp_t *result, switch_time_t input); +/** + * convert a time to its human readable components in a specific timezone with offset + * @param result the exploded time + * @param input the time to explode + */ +SWITCH_DECLARE(switch_status_t) switch_time_exp_tz(switch_time_exp_t *result, switch_time_t input, switch_int32_t offs); + /** * Sleep for the specified number of micro-seconds. * @param t desired amount of time to sleep. diff --git a/src/switch_apr.c b/src/switch_apr.c index 21f9242e30..f29c81885e 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -230,6 +230,11 @@ SWITCH_DECLARE(switch_status_t) switch_time_exp_lt(switch_time_exp_t *result, sw return apr_time_exp_lt((apr_time_exp_t *) result, input); } +SWITCH_DECLARE(switch_status_t) switch_time_exp_tz(switch_time_exp_t *result, switch_time_t input, switch_int32_t offs) +{ + return apr_time_exp_tz((apr_time_exp_t *) result, input, (apr_int32_t )offs); +} + SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt(switch_time_exp_t *result, switch_time_t input) { return apr_time_exp_gmt((apr_time_exp_t *) result, input);