mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Fix ISO 8601 format strings
This commit is contained in:
parent
4992b2c669
commit
eacada3982
2 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ trait DateFormatter {
|
|||
if($outFormat=="unix") return $date->getTimestamp();
|
||||
switch ($outFormat) {
|
||||
case 'http': $f = "D, d M Y H:i:s \G\M\T"; break;
|
||||
case 'iso8601': $f = "Y-m-dTH:i:s"; break;
|
||||
case 'iso8601': $f = "Y-m-d\TH:i:s"; break;
|
||||
case 'sql': $f = "Y-m-d H:i:s"; break;
|
||||
case 'date': $f = "Y-m-d"; break;
|
||||
case 'time': $f = "H:i:s"; break;
|
||||
|
@ -34,7 +34,7 @@ trait DateFormatter {
|
|||
if(!is_null($inFormat)) {
|
||||
switch($inFormat) {
|
||||
case 'http': $f = "D, d M Y H:i:s \G\M\T"; break;
|
||||
case 'iso8601': $f = "Y-m-dTH:i:sP"; break;
|
||||
case 'iso8601': $f = "Y-m-d\TH:i:sP"; break;
|
||||
case 'sql': $f = "Y-m-d H:i:s"; break;
|
||||
case 'date': $f = "Y-m-d"; break;
|
||||
case 'time': $f = "H:i:s"; break;
|
||||
|
|
|
@ -25,8 +25,8 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase {
|
|||
}
|
||||
|
||||
function assertTime($exp, $test) {
|
||||
$exp = $this->dateTransform($exp, "unix");
|
||||
$test = $this->dateTransform($test, "unix");
|
||||
$exp = $this->dateTransform($exp, "iso8601");
|
||||
$test = $this->dateTransform($test, "iso8601");
|
||||
$this->assertSame($exp, $test);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue