From: gggeek Date: Sat, 2 Jan 2021 17:37:23 +0000 (+0000) Subject: fix vardemo X-Git-Tag: plcapi-7.1-0~3^2~67 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=537abd434045577958c4b3e2ce77f71358c3341c fix vardemo --- diff --git a/demo/vardemo.php b/demo/vardemo.php index a47c22e..70436ff 100644 --- a/demo/vardemo.php +++ b/demo/vardemo.php @@ -84,7 +84,7 @@ print "Or in UTC, that is " . PhpXmlRpc\Helper\Date::iso8601Encode($t, 1) . "\n" $tb = PhpXmlRpc\Helper\Date::iso8601Decode($date); print "That is to say $date --> $tb\n"; print "Which comes out at " . PhpXmlRpc\Helper\Date::iso8601Encode($tb) . "\n"; -print "Which was the time in UTC at " . PhpXmlRpc\Helper\Date::iso8601Encode($date, 1) . "\n"; +print "Which was the time in UTC at " . PhpXmlRpc\Helper\Date::iso8601Encode($tb, 1) . "\n"; print "\n"; diff --git a/src/Helper/Date.php b/src/Helper/Date.php index c52223a..bc60cc4 100644 --- a/src/Helper/Date.php +++ b/src/Helper/Date.php @@ -26,8 +26,7 @@ class Date $t = strftime("%Y%m%dT%H:%M:%S", $timet); } else { if (function_exists('gmstrftime')) { - // gmstrftime doesn't exist in some versions - // of PHP + // gmstrftime doesn't exist in some versions of PHP $t = gmstrftime("%Y%m%dT%H:%M:%S", $timet); } else { $t = strftime("%Y%m%dT%H:%M:%S", $timet - date('Z'));