-
-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace strftime with date #2934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
$this->setCreatedAt(strftime('%Y-%m-%d %H:%M:%S', time())); | ||
$this->setScheduledAt(strftime('%Y-%m-%d %H:%M', (int)$time)); | ||
$this->setCreatedAt(date(Varien_Db_Adapter_Pdo_Mysql::TIMESTAMP_FORMAT)); | ||
$this->setScheduledAt(date('Y-m-d H:i:00', (int)$time)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->setScheduledAt(date('Y-m-d H:i:00', (int)$time)); | |
$this->setScheduledAt(date('Y-m-d H:i', (int)$time)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is strange to put a value without seconds for me, even if this works.
php > echo date('Y-m-d H:i');
2023-01-14 20:49
php > echo date('Y-m-d H:i:00');
2023-01-14 20:49:00
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just compared before/after and this is the only change i found in output. (y, its strange ;) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you agree to keep current behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either way both will save the value with 00 seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an opinion on this so as you all prefer :-)
Any chance you could also include |
This is another story. |
merged and cherrypicked to v20 |
Description
This PR replace
strftime
because it is deprecated since PHP 8.1. Ref #1812.Hope it's good 馃馃徑.
Partially tested with PHP 7.2, 7.3, 7.4, 8.0, 8.1, 8.2 with OpenMage 20.0.18.
Contribution checklist