Skip to content

Commit

Permalink
[TouchTask] fixed log output setting datetime (#1277)
Browse files Browse the repository at this point in the history
  • Loading branch information
siad007 authored Feb 29, 2020
1 parent fd4af3e commit c4c6a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/phing/tasks/system/TouchTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function setMillis($millis)
public function setDatetime($dateTime)
{
$this->dateTime = (string) $dateTime;
$this->setMillis(strtotime($this->dateTime));
}

/**
Expand Down Expand Up @@ -141,7 +142,6 @@ protected function checkConfiguration()

try { // try to touch file
if ($this->dateTime !== null) {
$this->setMillis(strtotime($this->dateTime));
if ($this->millis < 0) {
throw new BuildException("Date of {$this->dateTime} results in negative milliseconds value relative to epoch (January 1, 1970, 00:00:00 GMT).");
}
Expand Down

0 comments on commit c4c6a27

Please sign in to comment.