summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorChristian Schneider2011-02-28 14:52:49 +0000
committerChristian Schneider2011-02-28 14:52:49 +0000
commit3dd202a8c4564442a623945213e53aa9fc70589a (patch)
tree442f38afc7b83eaed51423d043613e7ecf05680a /it.class
parentdaed6196559143aaf8ccae624ad5a0fc86f39140 (diff)
downloaditools-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.class10
1 files changed, 3 insertions, 7 deletions
diff --git a/it.class b/it.class
index cc7650b..2978978 100644
--- a/it.class
+++ b/it.class
@@ -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;
}