install::TempContent::Objects::mod_perl-2.0.12::docs::api::APR::Date(3) | User Contributed Perl Documentation | install::TempContent::Objects::mod_perl-2.0.12::docs::api::APR::Date(3) |
APR::Date - Perl API for APR date manipulating functions
use APR::Date (); # parse HTTP-complient date string $date_string = 'Sun, 06 Nov 1994 08:49:37 GMT'; $date_parsed = APR::Date::parse_http($date_string); # parse RFC822-complient date string $date_string = 'Sun, 6 Nov 94 8:49:37 GMT'; $date_parsed = APR::Date::parse_rfc($date_string);
"APR::Socket" provides the Perl interface to APR date manipulating functions.
"APR::Date" provides the following functions and/or methods:
Parse HTTP date strings
$date_parsed = parse_http($date_string);
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
refer to RFC2616 for the details (GMT is assumed, regardless of the used timezone).
Remember to divide the return value by 1_000_000 if you need it in seconds.
Parse a string resembling an RFC 822 date. It's meant to be lenient in its parsing of dates. Hence, this will parse a wider range of dates than "parse_http()".
$date_parsed = parse_rfc($date_string);
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format Sun, 6 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sun, 06 Nov 94 08:49:37 GMT ; RFC 822 Sun, 6 Nov 94 08:49:37 GMT ; RFC 822 Sun, 06 Nov 94 08:49 GMT ; Unknown [drtr\@ast.cam.ac.uk] Sun, 6 Nov 94 08:49 GMT ; Unknown [drtr\@ast.cam.ac.uk] Sun, 06 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85] Sun, 6 Nov 94 8:49:37 GMT ; Unknown [Elm 70.85]
Remember to divide the return value by 1_000_000 if you need it in seconds.
mod_perl 2.0 documentation.
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
The mod_perl development team and numerous contributors.
2022-01-30 | perl v5.34.0 |