Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix/record created timestamp (#1127)
Props @kidunot89
- Loading branch information
Showing
2 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
namespace WP_Stream; | ||
|
||
class Test_Functions extends WP_StreamTestCase { | ||
public function test_wp_stream_get_iso_8601_extended_date() { | ||
$time = '1095379198'; | ||
|
||
$date = wp_stream_get_iso_8601_extended_date( $time ); | ||
$this->assertSame( $date, '2004-09-16T23:59:58+0000' ); | ||
|
||
$offset_date = wp_stream_get_iso_8601_extended_date( $time, 5 ); | ||
$this->assertSame( $offset_date, '2004-09-16T23:59:58+0500' ); | ||
} | ||
} |