diff options
-rw-r--r-- | it.class | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -712,17 +712,13 @@ static function date($format = "", $stamp = null) "date:en" => "m/d/Y", "datetime:en" => "m/d/Y h:ia", "time:en" => "h:ia", + "icsdate" => "Ymd", ); if (!($formatstring = $formats["$name:$language"]) && !($formatstring = $formats[$name])) { - if (it::match('^icsdate', $format)) # Special icsdate or icsdatetime format? Use UTC time format for Google Calendar to be happy - { - if ($format == "icsdate") - return date("Ymd", $stamp) . "Z"; # MUST NOT use gmdate! - else - return gmdate("Ymd", $stamp) . "T" . gmdate("His", $stamp) . "Z"; - } + if ($format == "icsdatetime") # Special icsdate or icsdatetime format? Use UTC time format for Google Calendar to be happy + return gmdate("Ymd", $stamp) . "T" . gmdate("His", $stamp) . "Z"; else $formatstring = $format; } |