-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Bug in libraries\cms\html\html.php #9169
Comments
Looks like there is a Known issue with using PHP's Reference on this issue PHP manual for Looks like there are a large number os systems specific caveats for using this function. |
I think too. And it should be no Problem to fix this bug |
Pull requests are welcome
|
Closing as we have a PR please test #9271 |
@brianteeman Should this be reopened since PR 9271 was rejected as a fix? |
@brianteeman Sorry,but i am unable to understand what actually this issue is all about.Is it about calendar not showing dates before 01.01.1970 or after 2038 (which is certainly the issue with the operating system one is using) OR is there something else that i am missing??? |
@flash1452 The code used for the calendar to "Format a local time/date according to locale settings" has system specific limitations. Preventing the calendar from using dates before 01.01.1970 or after 2038 on some systems (limitation is more specifically addressed in my first response). An alternative to |
@photodude Thanks,for your reply.So what other issues are to be handled alongside this one? |
@dgt41 does your new calendar field address this? If so this can be closed |
@brianteeman there are tags in the xml for the field where a dev can set the min and max year that the field should accept. if nothing is provided then 1970 is the minimum and 2030 is the maximum by default (that was a blind copy over the params that existed in the old calendar). So I guess it will be handled better than the current code |
OK - so I am closing this here as the new (to be merged) calendar will address this as stated above. |
Steps to reproduce the issue
If I use a form field type 'calendar' the field cannot show dates before 01.01.1970 or after 2038
Expected result
string representation of all dates
Actual result
empty inputvalue
System information (as much as possible)
The reason is the use of strftime() in html.prg function calendar():
$inputvalue = strftime($format, strtotime($value));
better could be:
$dat = DateTime::createFromFormat("Y-m-d H:i:s", $value);
$inputvalue = $dat->format(str_replace('%','',$format));
Additional comments
In source code of Joomla 3.5 this issue exist too.
Best Regards
Hartmut Schreiber
The text was updated successfully, but these errors were encountered: