UI Timezone List Incomplete
warmbowski last edited by
I re-installed 1.2.2 on a system (that had been running the same version beforehand) and after restoring the configuration, I noticed that my times were off. I went the the General Settings page and when I clicked the drop-down, I noticed that there were only maybe 60 timezones in the list, all of them 'Africa' timezones. So I couldn't set it to my timezone, which is America/Los Angeles (Pacific Time). I compared this system with an identical system that has a complete timezone list and is running the same CF image with similar configs (same time zone). I noticed that all of the files in /usr/share/zoneinfo are exactly the same in terms of names, sizes, and permissions. But the /etc/localtime file on the broken system is 0 bytes, where as the same file on the working system is 1,017 bytes.
Is there a way to regenerate the timezone list for the UI so that I can set the proper time zone?
Would it be possible to copy the localtime file over from the working system to the broken system to set it to the proper time zone?
Let me know if there are any other files that I should check.
Yes, you can copy the localtime file between systems of the same vintage without issue (and possibly others, but play it safe where possible)
I can't say I've ever seen the WebGUI show an incomplete list of Time Zones before, though.
The relevant part of system.php is this:
exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist); $timezonelist = array_filter($timezonelist, 'is_timezone'); sort($timezonelist);
So I would also copy over zoneinfo.tgz from a known working system.
Why did you reinstall 1.2.2 on this system? Could it have hard drive problems?
warmbowski last edited by
Bingo! I downloaded, unzipped and then tried to open zoneinfo.tar in 7zip and I got a CRC failure error. So I guess that file was corrupted.
You also are on the right track about the reinstall. It's an image that I 'physdiskwrite' to a CF card and install on Hacom hardware. The filesystem got corrupted earlier in the week, but I thought it was because of improper shutdown. Maybe it is the (relatively new) CF card going bad.
Thanks for the quick help.
I would definitely suspect the media at this point. I suppose it could be the controller, but that is much less likely than the CF dying.
The real way to know would be to pull the card out and mount it in another system and see if the file is still corrupted there, but it may be safe to assume the card is about to die.