summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2010-04-07 11:31:50 +0200
committerMichael Hamann <michael@content-space.de>2010-09-22 17:55:07 +0200
commitc4f79b71351dd0d96f19f7c5629888d85a814c72 (patch)
tree404b45b1606d3b9153faa3a16c8c9e56712e91da /inc/common.php
parent42de51b18d302d07e109c24dfb0ae237e6d38643 (diff)
downloadrpg-c4f79b71351dd0d96f19f7c5629888d85a814c72.tar.gz
rpg-c4f79b71351dd0d96f19f7c5629888d85a814c72.tar.bz2
Sitemap rewrite
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php
index bf5987c28..0816d9fbb 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1267,6 +1267,21 @@ function dformat($dt=null,$format=''){
}
/**
+ * Formats a timestamp as ISO 8601 date
+ *
+ * @author <ungu at terong dot com>
+ * @link http://www.php.net/manual/en/function.date.php#54072
+ */
+function date_iso8601($int_date) {
+ //$int_date: current date in UNIX timestamp
+ $date_mod = date('Y-m-d\TH:i:s', $int_date);
+ $pre_timezone = date('O', $int_date);
+ $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2);
+ $date_mod .= $time_zone;
+ return $date_mod;
+}
+
+/**
* return an obfuscated email address in line with $conf['mailguard'] setting
*
* @author Harry Fuecks <hfuecks@gmail.com>