Jump to content

Recommended Posts

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? :P) 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

:dubbio:

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 matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites


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? :P) under Windows XP:

"Etc/GMT-1"

spacer.png

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 by UCyborg
Link to comment
Share on other sites

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".

smilie_o_005.gif

24 minutes ago, UCyborg said:

Firefox works as expected here.

Here unfortunately not as I already mentioned before:

Firefox-ESR-52-9-0-time-zone.png

Link to comment
Share on other sites

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"

 

Link to comment
Share on other sites

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"


:P

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

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 by feodor2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. smilie_denk_24.gif Do you really think that I wouldn't have checked that first of all? albert.gif So, the question is what did you and @UCyborg do that makes Firefox ESR 52..9.0 show the correct time and timezone? :dubbio:

Link to comment
Share on other sites

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

Link to comment
Share on other sites

14 hours ago, AstroSkipper said:

All is correct. smilie_denk_24.gif Do you really think that I wouldn't have checked that first of all? albert.gif So, the question is what did you and @UCyborg do that makes Firefox ESR 52..9.0 show the correct time and timezone? :dubbio:

Ok! I checked my system once again. uniforme4.gif 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. :no: 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. :cheerleader: 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:

Firefox-ESR-52-9-0-time-zone-2.png

:thumbup

Edited by AstroSkipper
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

image.png.684bfdd46df9e6580757975cd3d3b3c3.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...