summaryrefslogtreecommitdiff
path: root/inc/feedcreator.class.php
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-09-28 16:38:14 +0200
committerAdrian Lang <lang@cosmocode.de>2010-09-28 16:42:43 +0200
commitde3eb1d7f990c4cc17722ce3bdff7b9568ab8b9c (patch)
tree743400a9afec72602b4ec99a21ff42ed7a402287 /inc/feedcreator.class.php
parent07d7dfcf87238d920900ca468d9399d80d8b7247 (diff)
downloadrpg-de3eb1d7f990c4cc17722ce3bdff7b9568ab8b9c.tar.gz
rpg-de3eb1d7f990c4cc17722ce3bdff7b9568ab8b9c.tar.bz2
Small fixes / cleanup
Diffstat (limited to 'inc/feedcreator.class.php')
-rw-r--r--inc/feedcreator.class.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php
index e7b8d7afc..68b9bdd2b 100644
--- a/inc/feedcreator.class.php
+++ b/inc/feedcreator.class.php
@@ -685,7 +685,8 @@ class FeedDate {
$months = Array("Jan"=>1,"Feb"=>2,"Mar"=>3,"Apr"=>4,"May"=>5,"Jun"=>6,"Jul"=>7,"Aug"=>8,"Sep"=>9,"Oct"=>10,"Nov"=>11,"Dec"=>12);
$this->unix = mktime($matches[4],$matches[5],$matches[6],$months[$matches[2]],$matches[1],$matches[3]);
if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
- $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
+ $tzOffset = (((int) substr($matches[7],0,3) * 60) +
+ (int) substr($matches[7],-2)) * 60;
} else {
if (strlen($matches[7])==1) {
$oneHour = 3600;
@@ -709,7 +710,8 @@ class FeedDate {
if (preg_match("~(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(.*)~",$dateString,$matches)) {
$this->unix = mktime($matches[4],$matches[5],$matches[6],$matches[2],$matches[3],$matches[1]);
if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
- $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
+ $tzOffset = (((int) substr($matches[7],0,3) * 60) +
+ (int) substr($matches[7],-2)) * 60;
} else {
if ($matches[7]=="Z") {
$tzOffset = 0;