mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Convert use of gmdate() to DateTime
This commit is contained in:
parent
854fb2c816
commit
1237a65bc8
4 changed files with 17 additions and 11 deletions
|
@ -1,9 +1,9 @@
|
|||
<?
|
||||
use Safe\DateTime;
|
||||
use function Safe\fopen;
|
||||
use function Safe\fwrite;
|
||||
use function Safe\fclose;
|
||||
use function Safe\error_log;
|
||||
use function Safe\gmdate;
|
||||
use function Safe\substr;
|
||||
|
||||
class Log{
|
||||
|
@ -34,7 +34,9 @@ class Log{
|
|||
return;
|
||||
}
|
||||
|
||||
fwrite($fp, gmdate('Y-m-d H:i:s') . "\t" . $this->RequestId . "\t" . $text . "\n");
|
||||
$now = new DateTime('now', new DateTimeZone('UTC'));
|
||||
|
||||
fwrite($fp, $now->format('Y-m-d H:i:s') . "\t" . $this->RequestId . "\t" . $text . "\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue