Timezone identifier support for PHP on Windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Triaged
|
Low
|
Unassigned |
Bug Description
Last login column for users search is blank (and does not sort in the correct order) also the warning saying 'PHP on your website host does not return a useful value for the timezone identifier (%z) .....' on the admin page is not a fix for the problem and unfortunately some of us are not able to change from hosting on a Windows server.
I am wondering if Mahara is using strftime resulting in the time zone identifier returning 'New Zealand Standard Time' in Windows rather than Linux' +1200 is part of the problem.
I have searched the forums but not found a fix.
Server: Windows 2012 R2
Mahara version: 15.04.0 and 1.9.4
IIS: 8.5 (both servers) also had same problem on a WAMP environment
PHP version: 5.5.3 and 5.5.8
MySQL version: 5.5.40 on both servers
tags: | added: windows |
tags: | added: iis wamp |
Changed in mahara: | |
status: | New → Triaged |
importance: | Undecided → Low |
milestone: | none → 15.10.0 |
Changed in mahara: | |
milestone: | 15.10.0 → 16.04.0 |
Changed in mahara: | |
milestone: | 16.04.0 → none |
Due to the limited development resources available to the Mahara core team, we don't officially support or test Mahara on platforms other than Ubuntu and Debian. That said, we are always willing to make small code changes to accommodate running on other platforms.
Doing a quick search through the code, I see that, although we have that prominent sanity check for %z, we actually only use %z in one place, during Leap2a exports. So that shouldn't be causing the problem that you're describing. I think the main problem that would cause, is that if you do a Leap2a export & import, you'll get weird dates on, for instance, blog entries.
Looking at the PHP docs for strftime() ( http:// php.net/ manual/ en/function. strftime. php ), I see that %e also doesn't work properly in Windows. We do use that in the "strftimedate" formatting string. However, the string that displays the last login dates on the user search page, is "strftimedatetime" in langconfig.php, which is "%%d %%B %%Y, %%l:%%M %%p". In theory that formatting string should work fine in Windows.
So, I'm not really sure what the fix is here.
Could you take a look in your database and see if the user's dates are stored properly in the "usr.lastlogin" column?