AstroSkipper Posted April 22, 2024 Posted April 22, 2024 (edited) 4 hours ago, Ben Markson said: This should default to: new Date().toLocaleString('en-gb', {timeZone: 'Europe/London'}); And I think that's the problem... it's all about the defaults values. Intl.DateTimeFormat().resolvedOptions().timeZone; ...will tell you your default time zone. For me, under original Firefox this reports: "Europe/London" which is correct. But under Serpent it reports: "UTC" which is plain, unadjusted, time. The JavaScript command Intl.DateTimeFormat().resolvedOptions().timeZone; leads in New Moon 28, Serpent 52 and Firefox ESR 52.9 to the same, wrong output (or should I say the same, currently wrong output? ) under Windows XP: "Etc/GMT-1" which means UTC/GMT +1 hours and is the correct winter time. In my location, however, it should actually be UTC/GMT +2 hours due to the currently valid summer time (DST). But this JavaScript command new Date().getTimezoneOffset(); returns the correct difference (in minutes) between UTC time and my local time: -120 My conclusion is that the JavaScript commands new Date().toLocaleString(); new Date().toLocaleString('de-DE'); only return the general time zone (here winter time, UTC/GMT +1) without any DST which has been set in Windows XP whereas. The JavaScript command new Date().toLocaleTimeString('de-DE', {timeZone: 'Europe/Berlin'}); can do the correct output in my case, of course. Anyway! There is a problem fetching the correct DST. Cheers, AstroSkipper Edited April 22, 2024 by AstroSkipper Update of content 2
roytam1 Posted April 22, 2024 Author Posted April 22, 2024 I do think if uprv_detectWindowsTimeZone() function in ICU4C 64 in mypal68 is broken?
UCyborg Posted April 22, 2024 Posted April 22, 2024 (edited) 1 hour ago, AstroSkipper said: The JavaScript command Intl.DateTimeFormat().resolvedOptions().timeZone; leads in New Moon 28, Serpent 52 and Firefox ESR 52.9 to the same, wrong output (or should I say the same, currently wrong output? ) under Windows XP: "Etc/GMT-1" Firefox works as expected here. 5 hours ago, Ben Markson said: So now the question is, where is Serpent getting the "UTC" string from and why doesn't it get "Europe/London"? Here, I get the same as @AstroSkipper, so "ETC/GMT-1". Edit: Serpent 52 also shows correct output when run on Windows 11. Edited April 22, 2024 by UCyborg
AstroSkipper Posted April 22, 2024 Posted April 22, 2024 24 minutes ago, UCyborg said: 5 hours ago, Ben Markson said: So now the question is, where is Serpent getting the "UTC" string from and why doesn't it get "Europe/London"? Here, I get the same as @AstroSkipper, so "ETC/GMT-1". 24 minutes ago, UCyborg said: Firefox works as expected here. Here unfortunately not as I already mentioned before: 3
AstroSkipper Posted April 22, 2024 Posted April 22, 2024 I found a further JavaScript command to get the correct, local time including DST in the web console of New Moon 28, Firefox ESR 52.9.0 and Serpent 52 probably too: new Date().toTimeString().slice(0,8); returns the correct,, currently local time at the moment: "19:41:01" 3
AstroSkipper Posted April 22, 2024 Posted April 22, 2024 (edited) On the other hand, the following JavaScript command returns the correct time zone including DST in Firefox ESR 52.9.0: new Date().toTimeString().slice(9); "GMT+0200" or new Date().toString(); "Mon Apr 22 2024 20:45:37 GMT+0200" or new Date().toDateString(); "Mon Apr 22 2024" Edited April 22, 2024 by AstroSkipper Update of content 3
feodor2 Posted April 22, 2024 Posted April 22, 2024 (edited) The problem that new firefoxes, supposed they done mentioned 1346211 bug, take the timezone from the OS anyway then send it to the icu and mess through its own big timezone tables, and then adjust time, which they take from the OS too, why??? Meanwhile time zone names differs in winxp and win7, and of course icu tables set to win7 names so fails on winxp. I don't get this foul behavior, I made to take the time zone and time from OS "AS IS" , I think OS knows better what time and browser should not mess with it, but I did not know about "toLocaleTimeString" Edited April 22, 2024 by feodor2 2
Ben Markson Posted April 22, 2024 Posted April 22, 2024 The tantalising question remains: why does my and @UCyborg's Firefox ESR 52.9 always return the correct answer? And could that be applied to the forks? 1 hour ago, AstroSkipper said: Here unfortunately not as I already mentioned before: Clutching as straws, but did you review your XP Regional and Time settings, and your Firefox language settings? 16 minutes ago, feodor2 said: Meanwhile time zone names differs in winxp and win7, and of course icu tables set to win7 names so fails on winxp. Does that mean the forks have been tailored for later OS's such that they no longer properly interpret XP? Ben.
AstroSkipper Posted April 22, 2024 Posted April 22, 2024 2 minutes ago, Ben Markson said: Clutching as straws, but did you review your XP Regional and Time settings, and your Firefox language settings? All is correct. Do you really think that I wouldn't have checked that first of all? So, the question is what did you and @UCyborg do that makes Firefox ESR 52..9.0 show the correct time and timezone? 3
feodor2 Posted April 22, 2024 Posted April 22, 2024 15 minutes ago, Ben Markson said: The tantalising question remains: why does my and @UCyborg's Firefox ESR 52.9 always return the correct answer? 52 has EXPOSE_INTL_API for those mypal JS_HAS_INTL_API rowtam's went forward assume the same https://github.com/roytam1/UXP/blob/de7e7860ffb93fed8394b568421c851070f50b84/js/src/jsdate.cpp#L2984 and seems removed OS version at all - uh Next I try without JS_HAS_INTL_API
AstroSkipper Posted April 22, 2024 Posted April 22, 2024 (edited) 14 hours ago, AstroSkipper said: All is correct. Do you really think that I wouldn't have checked that first of all? So, the question is what did you and @UCyborg do that makes Firefox ESR 52..9.0 show the correct time and timezone? Ok! I checked my system once again. In my Windows XP main partition, I unfortunately discovered that one of four registry keys relating to the region and language options had disappeared. No idea why. However, the time and time zone display was still intact. Fortunately, I have a second Windows XP partition from which I was able to export the missing key HKEY_CURRENT_USER\Control Panel\International and import it into my main partition. Now, all is working again. This fixing has actually led to a change in Firefox ESR 52.9.0. Now I also get the correct time and time zone displayed there: Edited April 23, 2024 by AstroSkipper 4
NotHereToPlayGames Posted April 22, 2024 Posted April 22, 2024 1 hour ago, AstroSkipper said: I unfortunately discovered that one of four registry keys relating to the region and language options had disappeared. No idea why. POSReady2009 would be my guess. Perhaps KB4501226?
roytam1 Posted April 22, 2024 Author Posted April 22, 2024 3 hours ago, feodor2 said: 52 has EXPOSE_INTL_API for those mypal JS_HAS_INTL_API rowtam's went forward assume the same https://github.com/roytam1/UXP/blob/de7e7860ffb93fed8394b568421c851070f50b84/js/src/jsdate.cpp#L2984 and seems removed OS version at all - uh Next I try without JS_HAS_INTL_API it is done by upstream: https://github.com/roytam1/UXP/commit/8e9e42c7d8b673d204c6f07c7b3c14bf4b3be484
feodor2 Posted April 22, 2024 Posted April 22, 2024 3 hours ago, feodor2 said: Next I try without JS_HAS_INTL_API That's was all folks Applied to my new 68.14 you may check it already has been published 1
66cats Posted April 22, 2024 Posted April 22, 2024 18 minutes ago, feodor2 said: has been published Tried https://github.com/Feodor2/Mypal68/releases & https://www.mypal-browser.org/download.html, no joy. Could you post a link? (And thank you for the browser, if it needs saying).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now