diff options
author | Christian Schneider | 2011-02-28 14:52:49 +0000 |
---|---|---|
committer | Christian Schneider | 2011-02-28 14:52:49 +0000 |
commit | 3dd202a8c4564442a623945213e53aa9fc70589a (patch) | |
tree | 442f38afc7b83eaed51423d043613e7ecf05680a /it.class | |
parent | daed6196559143aaf8ccae624ad5a0fc86f39140 (diff) | |
download | itools-3dd202a8c4564442a623945213e53aa9fc70589a.tar.gz itools-3dd202a8c4564442a623945213e53aa9fc70589a.tar.bz2 itools-3dd202a8c4564442a623945213e53aa9fc70589a.zip |
Fix ICS date format without time
Diffstat (limited to 'it.class')
-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; } |