Bug in setting timezone in latest Omega firmware Console



  • @Lazar-Demin and otther Omega people: I believe there are one or more bugs in the code for the setting of timezone in the latest Console.
    I have recently upgraded to the latest release 0.0.7 b281 and it seems that attempting to set timezone in the Console doesn't work. Just in case I had done something silly, I have tried a firmware reset (by pressing and holding the reset button) and while the reset has worked, setting of timezone still doesn't work.

    I have done some digging into the code and have found one or more (potential) bugs in the code:

    1. There definitely seems to be a bug in the code in /www/service/onion-device-provider/onion-device- provider.html in function changeTimezone - I believe that the code that currently reads:
    •   				var zonenamePromise = new Promise(function (resolve, reject) {
        					ubus.request('file', 'exec', {
        						command: 'uci', 
        						params: [
        							'set', 
        							'system.@system[0].timezone=' + timezone
        						]
      

    should actually read:

    •   				var zonenamePromise = new Promise(function (resolve, reject) {
        					ubus.request('file', 'exec', {
        						command: 'uci', 
        						params: [
        							'set', 
        							'system.@system[0].zonename=' + zonename
        						]
      
    1. However, having made this change, the timezone still does not get set. I think there maybe something wrong in the code in /www/apps/onion-settings/onion-settings-general.html for calling the above changeTimezone function, since as far as I can make out, that function is not getting called - though I can't figure out why not šŸ˜ž I would have expected to see either a message like 'Timezone changed successfully.' or 'Unable to set the timezone.' irrespective of any bugs in changeTimezone function.

  • administrators

    @Kit-Bishop
    We've tested this on our end with the latest firmware and the timezone change does in fact take effect. Can you please outline how the timezone change didn't work?

    Also, for future bug reports, can you please use the GitHub issues page for the Console



  • @Lazar-Demin Still having the problem. In case it was something really silly I had done, I have now done the following (with additional notes/information) and still have the problem:

    • Made sure i was on a clean copy of latest release (0.0.7 b281) by doing oupgrade -force
    • Did a factory reset by pressing and holding reset button for 15 seconds
    • At this stage:
      • /etc/TZ contains GMT0
      • /etc/config/system has:
        option zonename 'UTC'
        option timezone 'GMT0'
      • Console-->Settings-->General Settings-->Timezone shows Select your timezone
    • Selected a time zone and clicked on Save Settings
    • Results:
      • No message on screen
      • /etc/TZ and /etc/config/system unchanged from above
    • Exited Console and rechecked files - still no change
    • Did a reboot and rechecked files - still no change
    • The only way I can get my timezone set is via one or other of the following:
      • Hand edit the**/etc/config/system** file and reboot
      • Use appropriate uci set and uci commit commands
    • I also think that there really is a bug in /www/service/onion-device-provider/onion-device- provider.html - the body of zonenamePromise sets timezone and is exactly the same code as in timezonePromise - this can't be right!

    In addition to this, I have a similar problem in trying to set the Security setting in Console-->Settings-->Wi-Fi AP Settings - no matter what I select, the Security setting is ignored and I have to hand edit the file /etc/config/wireless to get what I want.

    I have added all the above to a new bug report in GitHub issues page for the Console - reference:https://github.com/OnionIoT/Onion-Console/issues/14


  • administrators

    @Kit-Bishop I've responded in the issues thread in detail, to avoid posting the same thing in two different places, let's fully move the conversation to the GitHub issues page: https://github.com/OnionIoT/Onion-Console/issues/14



  • @Lazar-Demin Thanks for your time on this šŸ™‚ Have posted an additional comment in the bug report.



  • As a quick update to this: I have done some further investigation on https://github.com/OnionIoT/Onion-Console/issues/14 and have found the problem to be browser dependent as is covered by the new issue I have raised : https://github.com/OnionIoT/Onion-Console/issues/17


  • administrators

    @Kit-Bishop Ok, makes sense since I've been doing all my testing in Chrome! We'll investigate and then get back to you!

    For now, please try to use Chrome with the Console.



  • @Lazar-Demin I've been a long time adherent of Firefox; ever since getting fed up with MS Explorer some years ago. But I've been having enough issues with Firefox recently that I'm now switching to Chrome.

    In my "real" job I help develop a large web based application. Amongst our test suites that we have to run all changes through are tests with different web browsers since there are enough differences between how each behaves that we often have to tweak the code to handle issues with one browser or another. šŸ™‚


  • administrators

    @Kit-Bishop Yeah, we're planning to add that type of testing to our development process in a few weeks.
    For now we've just been 'going fast and breaking things' šŸ™‚


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.