diff options
Diffstat (limited to 'ext/date/lib/parse_date.re')
-rw-r--r-- | ext/date/lib/parse_date.re | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index 06ab7e36bb..f3f5906b0a 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -168,8 +168,6 @@ typedef struct _timelib_relunit { int multiplier; } timelib_relunit; -#define HOUR(a) (int)(a * 60) - /* The timezone table. */ const static timelib_tz_lookup_table timelib_timezone_lookup[] = { #include "timezonemap.h" @@ -2238,39 +2236,6 @@ const timelib_tz_lookup_table *timelib_timezone_abbreviations_list(void) return timelib_timezone_lookup; } -long timelib_parse_tz_cor(char **ptr) -{ - char *begin = *ptr, *end; - long tmp; - - while (isdigit(**ptr) || **ptr == ':') { - ++*ptr; - } - end = *ptr; - switch (end - begin) { - case 1: - case 2: - return HOUR(strtol(begin, NULL, 10)); - break; - case 3: - case 4: - if (begin[1] == ':') { - tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 2, NULL, 10); - return tmp; - } else if (begin[2] == ':') { - tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); - return tmp; - } else { - tmp = strtol(begin, NULL, 10); - return HOUR(tmp / 100) + tmp % 100; - } - case 5: - tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); - return tmp; - } - return 0; -} - #ifdef DEBUG_PARSER_STUB int main(void) { |