summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2010-11-02 22:40:58 +0100
committerMichael Hamann <michael@content-space.de>2010-11-02 22:40:58 +0100
commit37ba24e45987e30969f8d7230c25384471bb1b11 (patch)
tree1e9bb856026ac11e3297328362d9b3e1d751a70c /inc/common.php
parent5d85efc6906bd57ed94bd1fceb7fe09d6a795866 (diff)
parent762b4c44c691f69d521413d7016314e7f547c102 (diff)
downloadrpg-37ba24e45987e30969f8d7230c25384471bb1b11.tar.gz
rpg-37ba24e45987e30969f8d7230c25384471bb1b11.tar.bz2
Merge branch 'master', remote branch 'sitemap/master'
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 3e760419f..894b8a020 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1271,6 +1271,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>