What's new

Timezone difference warning

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

fiasko

Regular Contributor
I'm currently using the latest merlin firmwares (384.13_8 and 384.17) with my AC87U and AC88U routers. Both of them are complaining about timeoze difference between router and local all around the configuration menus. (I dont' know the exact error message in English since, i'm using the router with Finnish localization.)
This is propably not a Merlin firmware issue nor even a firmware version related issue. In fact I'm quite sure I've seen this warning many times over the years. I wonder if this issue can be fixed.
So does that error message mean that the web browser I'm using is advertizing different timezone value than what is configured in the router? I live in Finland and the timezone is GMT+2 Helsinki (+DST 1 h) and this is configured in the router. All settings should be correct, since router log and displayed time matches the "reality". My Windows seems to have same settings. UTC+2 +DST. Can this issue be fixed?
 
I'm currently using the latest merlin firmwares (384.13_8 and 384.17) with my AC87U and AC88U routers. Both of them are complaining about timeoze difference between router and local all around the configuration menus. (I dont' know the exact error message in English since, i'm using the router with Finnish localization.)
This is propably not a Merlin firmware issue nor even a firmware version related issue. In fact I'm quite sure I've seen this warning many times over the years. I wonder if this issue can be fixed.
So does that error message mean that the web browser I'm using is advertizing different timezone value than what is configured in the router? I live in Finland and the timezone is GMT+2 Helsinki (+DST 1 h) and this is configured in the router. All settings should be correct, since router log and displayed time matches the "reality". My Windows seems to have same settings. UTC+2 +DST. Can this issue be fixed?
In administration what time server are you using I suggest using a pool.ntp.org server closest to you, for me being in Australia it's au.pool.ntp.org

For your case it would be

fi.pool.ntp.org

If you need additional servers.
server 0.fi.pool.ntp.org
server 1.fi.pool.ntp.org
server 2.fi.pool.ntp.org
server 3.fi.pool.ntp.org

See if that helps.

Source
https://www.ntppool.org/zone/fi
 
Thanks. It shows "Thu May 07 2020 22:28:01 GMT+0300 (Itä-Euroopan kesäaika)" where (Itä-Euroopan kesäaika) means east-european summer time. So the time matches and they are almost the same, but not quite I guess.
Well the browser string looks fine. I guess it's a firmware bug.

What happens if you change to another country in the same timezone?
 
Well the browser string looks fine. I guess it's a firmware bug.

What happens if you change to another country in the same timezone?
Do you mean if I change the computer timezone or the router timezone? If I remember correctly, during the winter when there's no DST I haven't seen the error message. So maybe the timezone difference bug shows only during DST.
 
I mean on the router. Like if you chose Athens which AFAICT is the same time zone as Helsinki with the same DST rules.
 
Thanks. It shows "Thu May 07 2020 22:28:01 GMT+0300 (Itä-Euroopan kesäaika)" where (Itä-Euroopan kesäaika) means east-european summer time. So the time matches and they are almost the same, but not quite I guess.
I wonder if the browser time zone is being compared to the nvram values below:
Code:
# nvram get time_zone
EST5DST
# nvram get time_zone_x
EST5DST,M3.2.0/2,M11.1.0/2
Browserspy.dk formats:
Code:
Fri May 08 2020 08:28:36 GMT-0400 (Eastern Daylight Time)
Thu May 07 2020 22:28:01 GMT+0300 (Itä-Euroopan kesäaika)
 
I see. So every time DST kicks in, the complaining starts again.
As far as I can tell it should be working. According to this the Helsinki time zone code is UTC-2DST_3. And according to this the DST changes are set correctly.

Did you try changing the router to Athens? Did the warning message go away?
 
I just tried it, and still the warning shows up.
Strange. Sounds like a bug then.

If you're interested... Log into the router and then from any page open up (in Chrome) the developer console and search for "uptimeStr". You should see something like this that matches you browser's timezone offset.

Untitled.png
 
This is what I found: var uptimeStr = "Sat, 09 May 2020 21:04:01 +0300(218368 secs since boot)";
That seems correct to me.
 
:eek: OK I think I've spotted the problem.

You said earlier that your browser was returning this string:

Thu May 07 2020 22:28:01 GMT+0300 (Itä-Euroopan kesäaika)


The problem is that this piece of code is searching for the last occurrence of "+" or "-" in that string and then comparing it and the 4 characters following with the characters in uptimeStr_update.

So in your case it's comparing "-Euro" with "+0300".

@RMerlin @john9527 Maybe the code needs to be changed so that it searches for the first occurrence of "+" or "-"? (indexOf() instead of lastIndexOf())
 
Maybe the code needs to be changed so that it searches for the first occurrence of "+" or "-"? (indexOf() instead of lastIndexOf())
Just a guess, but I'm wondering if the date portion of the date string can be changed in the system locale settings to a format that includes a '-'....hence the check to get to the last one.
Probably would be better to search for GMT (or UTC....not sure if that's used now by some systems).....or maybe search for the last '00' and back up the pointer since everything should be an even hour.
Have to think about it a bit....
 
Last edited:
Just a guess, but I'm wondering if the date portion of the date string can be changed in the system locale settings to a format that includes a '-'....hence the check to get to the last one.
Probably would be better to search for GMT (or UTC....not sure if that's used now by some systems).....or maybe search for the last '00' and back up the pointer since everything should be an even hour.
Have to think about it a bit....
Don't rely timezones and especially DST to be with even hour offsets. That assumption will very likely bite you. Some regular expression rule is propably better ([+-][0-9]+) for example.
 
Just a guess, but I'm wondering if the date portion of the date string can be changed in the system locale settings to a format that includes a '-'....hence the check to get to the last one.
All the JS references I've found so far have the output of the Date() function in the same format, with the only variable part contained within the brackets at the end.

.....or maybe search for the last '00' and back up the pointer since everything should be an even hour.
That wouldn't work because there are supported time zones like "GMT+05:45".
 
That wouldn't work because there are supported time zones like "GMT+05:45".
Now that's a new one on me o_O
Don't rely timezones and especially DST to be with even hour offsets. That assumption will very likely bite you. Some regular expression rule is propably better ([+-][0-9]+) for example.
I like this idea best.....made a new string prototype 'regexIndexOf' and check for +/- followed by four digits (have to love Stack Overflow)
 
I believe these Javascript examples should get you the matches you are looking for. No need to play with any string indexes:

const paragraph = 'Thu May 07 2020 22:28:01 GMT+0300 (Itä-Euroopan kesäaika)';
const regex = /([+-][0-9]+)/g;
const found = paragraph.match(regex);
console.log(found[0]);

const paragraph2 = 'Sat, 09 May 2020 21:04:01 +0300(218368 secs since boot)'
const regex2 = /([+-][0-9]+)\(([0-9]+)/;
let match = regex2.exec(paragraph2);
console.log(match[1]);
console.log(match[2]);
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top