-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Time::setTestNow() does not work with fa Locale #6116
Conversation
5d2e49c
to
457d5ec
Compare
I'm not sure what is happening with Coveralls. Maybe it is getting confused about the different branches? |
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.
Actually now I'm not sure about this. The User Guide is very clear that toLocalizedString()
is for localization whereas toDateTimeString()
"will return a string formatted as you would commonly use for datetime columns in a database (Y-m-d H:i:s)" (https://codeigniter4.github.io/userguide/libraries/time.html#todatetimestring).
Reading that makes me think the problem is actually using the localization in toDateTimeString()
.
It is difficult to read but I think
It is clear if you see the implementation. |
You're right! But the UG is still confusing: I would have used |
After some reading it looks like DATETIME/TIMESTAMP inputs must always be decimal. I think we need to add |
Friends just for information, the output of command |
Is this related to here? |
@paulbalandan Yes. The issue is because of the same bug. |
ErrorException : DateTime::modify(): Failed to parse time string (۲۰۱۷-۰۳-۱۰ ۰۰:۰۰:۰۰) at position 0 (�): Unexpected character .../CodeIgniter4/system/I18n/Time.php:96
457d5ec
to
7f7e7cf
Compare
I sent a PR #6121 |
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.
Okay, I am on board - this is definitely e right direction. 4.3 feature request: toDatabase()
Description
Checklist: