When taking attendance under People>Attendance the date is not correct on the destination page.
When I click on the 20 in the bottom row:
I get this page with an odd error message and an incorrect date:
The server time is correct: Fri Apr 20 11:56:27 PDT 2018`
I’m suspicious of your encoding and proxy again, I havn’t seen this behavior elsewhere. What does the resulting URL look like on the second page? Does it happen for any other pages with dates passed in the URL?
It is interesting that it thinks 1969 is in the future But of course it’s just falling back to one second before the UNIX epoch so it’s likely a null reference being passed into the expected date value.
Thanks for clarifying the language setting as US English. That is very odd, and I guess you are right in terms of encoding. Is there any reason you can see why the previous fix might not be working in this case?
The “Take Attendance by Class” feature that is passing the date successfully is a form submit button (Go) such as the one on the page: Home > Attendance > Take Attendance by Class
The other URL is from clicking on the date on the page: Home > Attendance > View Daily Attendance
This difference between form submit and simple link appears to be consistent on other pages too. i.e. form submits get URL encoded (and work), simple links do not get encoded (and do not work).
Now that is very interesting, as the date should be transferred in form shown in the text box to the user, not in MySQL style (e.g. YYYY-MM-DD). I see it, with UK English correctly:
I took a closer look at the code… and I’m going to chime in here and take the blame on this one Looks like the Daily Attendance page is passing all the dates for the links as YYYY-MM-DD, and the dateConvert() function has a strtotime() inside it (except for US dates, because they’re wonky and handled separately), so the function was gratiously allowing me to mishandle the dates without knowing it. I think this was one of the earlier things I contributed … either way, I’ll PR a fix.
Ah, right, I forgot that there was another page that forwarded along to here. Next time I’ll have to ask for exact steps to reproduce! The resulting PR has now been merged. Case closed : )