diff --git a/lib/Resque/Log.php b/lib/Resque/Log.php index 08c5f48..934ba49 100644 --- a/lib/Resque/Log.php +++ b/lib/Resque/Log.php @@ -28,7 +28,7 @@ public function log($level, string|\Stringable $message, array $context = []): v if ($this->verbose) { fwrite( STDOUT, - '[' . $level . '] [' . strftime('%T %Y-%m-%d') . '] ' . $this->interpolate($message, $context) . PHP_EOL + '[' . $level . '] [' . date('H:i:s Y-m-d') . '] ' . $this->interpolate($message, $context) . PHP_EOL ); return; } diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index 0ba2511..e8b6476 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -230,7 +230,7 @@ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false) // Forked and we're the child. Or PCNTL is not installed. Run the job. if ($this->child === 0 || $this->child === false || $this->child === -1) { - $status = 'Processing ' . $job->queue . ' since ' . strftime('%F %T'); + $status = 'Processing ' . $job->queue . ' since ' . date('Y-m-d H:i:s'); $this->updateProcLine($status); $this->logger->log(Psr\Log\LogLevel::INFO, $status); @@ -251,7 +251,7 @@ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false) if($this->child > 0) { // Parent process, sit and wait - $status = 'Forked ' . $this->child . ' at ' . strftime('%F %T'); + $status = 'Forked ' . $this->child . ' at ' . date('Y-m-d H:i:s'); $this->updateProcLine($status); $this->logger->log(Psr\Log\LogLevel::INFO, $status); diff --git a/lib/ResqueScheduler/Worker.php b/lib/ResqueScheduler/Worker.php index 06d3ff7..859f606 100644 --- a/lib/ResqueScheduler/Worker.php +++ b/lib/ResqueScheduler/Worker.php @@ -139,7 +139,7 @@ public function log($message) if($this->logLevel == self::LOG_NORMAL) { fwrite(STDOUT, "*** " . $message . "\n"); } elseif($this->logLevel == self::LOG_VERBOSE) { - fwrite(STDOUT, "** [" . strftime('%T %Y-%m-%d') . "] " . $message . "\n"); + fwrite(STDOUT, "** [" . date('H:i:s Y-m-d') . "] " . $message . "\n"); } }