fix magpie w3cdtf parsing (closes #110)
This commit is contained in:
parent
375a346d0c
commit
67b9c19aa0
|
@ -29,13 +29,13 @@ function parse_w3cdtf ( $date_str ) {
|
||||||
|
|
||||||
if ( preg_match( $pat, $date_str, $match ) ) {
|
if ( preg_match( $pat, $date_str, $match ) ) {
|
||||||
list( $year, $month, $day, $hours, $minutes, $seconds) =
|
list( $year, $month, $day, $hours, $minutes, $seconds) =
|
||||||
array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]);
|
array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[7]);
|
||||||
|
|
||||||
# calc epoch for current date assuming GMT
|
# calc epoch for current date assuming GMT
|
||||||
$epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
|
$epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
|
||||||
|
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
if ( $match[10] == 'Z' ) {
|
if ( $match[11] == 'Z' ) {
|
||||||
# zulu time, aka GMT
|
# zulu time, aka GMT
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue