Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34414 > unrolled thread
| Started by | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| First post | 2017-12-31 09:57 -0800 |
| Last post | 2018-01-25 13:33 -0800 |
| Articles | 20 on this page of 84 — 11 participants |
Back to article view | Back to comp.lang.javascript
new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2017-12-31 09:57 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-12-31 20:48 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale JJ <jj4public@vfemail.net> - 2018-01-02 04:41 +0700
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-01 23:37 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-03 02:25 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-03 12:55 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-04 04:02 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Martin Honnen <martin.honnen@gmx.de> - 2018-01-04 13:30 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-04 16:48 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-06 13:02 -0200
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-06 11:18 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-07 13:07 -0200
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-07 12:19 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 11:43 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-08 13:26 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 16:36 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-08 06:09 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 16:33 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-08 18:58 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-08 19:33 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-08 20:26 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-08 22:10 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 02:55 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-09 09:36 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 02:10 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-09 03:35 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-09 15:51 +1100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-09 13:17 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-09 14:44 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-09 14:13 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-10 17:28 +1100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-10 21:01 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-10 21:00 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-09 13:19 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-20 08:43 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 15:09 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-21 17:25 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 16:41 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-21 19:15 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 18:56 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-21 21:58 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-21 23:03 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-22 10:41 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-22 11:17 -0200
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-22 14:23 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-23 03:50 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-23 04:41 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-23 08:55 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-23 14:44 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-23 20:04 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-23 23:10 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-23 08:44 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 03:24 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-01-23 13:27 -0800
Zulu time (was: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-24 00:44 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-24 01:37 -0200
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-24 04:57 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-24 04:10 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-24 10:19 -0200
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-25 08:20 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-25 10:26 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-25 14:26 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-26 15:42 +1100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-26 11:19 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-27 07:16 +1100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-26 23:22 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-27 10:33 +1100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-27 11:30 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-28 07:38 +1100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-27 23:47 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-28 10:07 +1100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Mark-" <nospam@mapson.xyz> - 2018-01-28 01:14 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-28 05:25 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Andrew Poulos <ap_prog@hotmail.com> - 2018-01-28 16:07 +1100
[OT] Fallacies (was: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-01-28 07:18 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale John G Harris <niam@jghnorth.org.uk.invalid> - 2018-01-24 13:51 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Joao Rodrigues <groups_jr-1@yahoo.com> - 2018-01-24 17:13 -0200
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 03:00 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-23 14:14 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-01-23 15:44 +0100
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 04:24 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Jon Ribbens <jon+usenet@unequivocal.eu> - 2018-01-23 14:29 +0000
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-23 03:19 -0800
Re: new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale Dr J R Stockton <J.R.Stockton@physics.org> - 2018-01-25 13:33 -0800
Page 1 of 5 [1] 2 3 4 5 Next page →
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2017-12-31 09:57 -0800 |
| Subject | new Date().toLocaleTimeString() sponned in Fall Creators Update. UL locale |
| Message-ID | <9acafc2f-1bc7-442f-adb7-ee34368545a8@googlegroups.com> |
All of my PCs are set, everywhere that I have found, to use UK, English, and ISO 8601, including the 24-hour clock. JavaScript new Date().toLocaleTimeString() in up-to-date Windows 7, final Windows XP, and probably in Windows 98 & maybe even in Windows 3.x, and probably also in previous Windows 10, gave the 24-hour clock, "HH:MM:SS" Today, I allowed a Windows 10 update on my laptop FUJ-2012 - what arrived was Fall Creators Update, I think. In the new update, I get "hh:mm:ss PM". I expect to see AM tomorrow morning. and an wondering whether the hours field will have its leading zero before 10:00; I believe I've seen corresponding ineptitude somewhere in UTC time. That is the case in all of the browsers I tested, which are not all that I have. I don't know what happens in other locales, but it seems likely that Evertjan & others will be able to tell us. Note to EjH - in the Subject, sponning does not have its Dutch meaning; it has the Grytpype-Thynne one. I am altering my applications to build the time string from the hour, minute, and second numbers. The update also did not preserve my chosen screen saver setting, which is the time. HNY, -- (c) John Stockton, near London, UK. Using Google, no spell-check. | Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |
[toc] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2017-12-31 20:48 +0100 |
| Message-ID | <XnsA85CD3AB78AA3eejj99@194.109.6.166> |
| In reply to | #34414 |
Dr J R Stockton <J.R.Stockton@physics.org> wrote on 31 Dec
2017 in comp.lang.javascript:
> All of my PCs are set, everywhere that I have found, to
> use UK, English, and ISO 8601, including the 24-hour clock.
>
> JavaScript new Date().toLocaleTimeString() in up-to-date
> Windows 7, final Windows XP, and probably in Windows 98 &
> maybe even in Windows 3.x, and probably also in previous
> Windows 10, gave the 24-hour clock, "HH:MM:SS"
>
> Today, I allowed a Windows 10 update on my laptop FUJ-2012
> - what arrived was Fall Creators Update, I think.
>
> In the new update, I get "hh:mm:ss PM". I expect to see
> AM tomorrow morning. and an wondering whether the hours
> field will have its leading zero before 10:00; I believe
> I've seen corresponding ineptitude somewhere in UTC time.
<!DOCTYPE html>
<script type='text/javascript'>
'use strict';
document.write(new Date().toLocaleTimeString());
// in Windows 10 Home ver 1709 build 16299.125:
// '8:26:41 PM' Google Chrome version 64.0.3282.39
// (Off.B.) beta (64-bit)
// '20:27:14' Microsoft Edge 41.16299.15.0
</script>
> That is the case in all of the browsers I tested, which
> are not all that I have.
>
> I don't know what happens in other locales, but it seems
> likely that Evertjan & others will be able to tell us.
>
> Note to EjH - in the Subject,
What Subject are you talking about, a British one?
> sponning does not have its
> Dutch meaning;
rabbet; runway; slot; chamfer; groove; fluting; rifling
> it has the Grytpype-Thynne one.
I seem to miss the context altogether.
> I am altering my applications to build the time string
> from the hour, minute, and second numbers.
Well, don't use these silly ones,
like ".toLocaleTimeString()",
as they only apply to American logic.
Use standard ones, or their UTC sisters, like:
getDate()
getDay()
getFullYear()
getHours()
getMilliseconds()
getMinutes()
getMonth()
getSeconds()
and
getTimezoneOffset()
======
However, I prefer serverside coding.
> The update also did not preserve my chosen screen saver
> setting, which is the time.
Is your screen worth saving?
Or do you want to save time?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | JJ <jj4public@vfemail.net> |
|---|---|
| Date | 2018-01-02 04:41 +0700 |
| Message-ID | <1ic3q5nw29i0p$.fh4fksew706v$.dlg@40tude.net> |
| In reply to | #34415 |
On Sun, 31 Dec 2017 20:48:28 +0100, Evertjan. wrote: > > document.write(new Date().toLocaleTimeString()); > > // in Windows 10 Home ver 1709 build 16299.125: > > // '8:26:41 PM' Google Chrome version 64.0.3282.39 > // (Off.B.) beta (64-bit) > > // '20:27:14' Microsoft Edge 41.16299.15.0 In Windows 7 SP1 x64, my time locale is set to: - Short format: HH:mm - Long format: HH:mm:ss When tested in web browsers: console.log(new Date().toLocaleTimeString()); //"3:58:24 AM" - Chromium 59.0.3067.0 and Firefox ESR 52.1.2 //"03:58:24" - MSIE 11 //"03:58:24" - Opera (Presto) 11.64 In Ubuntu v14 x64 set with 24-hour time format: console.log(new Date().toLocaleTimeString()); //"03.58.24" - Firefox 47 In Zorin v12 x64 set with 24-hour time format: console.log(new Date().toLocaleTimeString()); //"03:58:24" - Chromium 60.0.3112.113 In Debian v8.9 x64 set with 24-hour time format: console.log(new Date().toLocaleTimeString()); //"3:58:24 AM" - Firefox ESR 52.3.0 So, it looks like a web browser issue rather than OS.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-01-01 23:37 +0100 |
| Message-ID | <XnsA85DF05BDA963eejj99@194.109.6.166> |
| In reply to | #34417 |
JJ <jj4public@vfemail.net> wrote on 01 Jan 2018 in comp.lang.javascript: > On Sun, 31 Dec 2017 20:48:28 +0100, Evertjan. wrote: >> >> document.write(new Date().toLocaleTimeString()); >> >> // in Windows 10 Home ver 1709 build 16299.125: >> >> // '8:26:41 PM' Google Chrome version 64.0.3282.39 >> // (Off.B.) beta (64-bit) >> >> // '20:27:14' Microsoft Edge 41.16299.15.0 > > In Windows 7 SP1 x64, my time locale is set to: > > - Short format: HH:mm > - Long format: HH:mm:ss > > When tested in web browsers: > > console.log(new Date().toLocaleTimeString()); > > //"3:58:24 AM" - Chromium 59.0.3067.0 and Firefox ESR 52.1.2 > //"03:58:24" - MSIE 11 > //"03:58:24" - Opera (Presto) 11.64 > > In Ubuntu v14 x64 set with 24-hour time format: > > console.log(new Date().toLocaleTimeString()); > > //"03.58.24" - Firefox 47 > > In Zorin v12 x64 set with 24-hour time format: > > console.log(new Date().toLocaleTimeString()); > > //"03:58:24" - Chromium 60.0.3112.113 > > In Debian v8.9 x64 set with 24-hour time format: > > console.log(new Date().toLocaleTimeString()); > > //"3:58:24 AM" - Firefox ESR 52.3.0 > > > So, it looks like a web browser issue rather than OS. Indeed, but only if you take issue with it. Methinks having the browser or the o.s. settings dictate how my web-page will visualize time is a non-issue. If at all possible, static date/time should be rendered serverside, just like all other data code that messses up crossbrowser or crossbrowserversion wize. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-01-03 02:25 +0100 |
| Message-ID | <1998690.EKHdCXc8td@PointedEars.de> |
| In reply to | #34417 |
JJ wrote: > So, it looks like a web browser issue rather than OS. Your logic is flawed. In order to make that determination, you would have to test at least two browsers with two different settings on the same operating system. With that said, the date and time formats are usually not determined by the operating system, but by the desktop. -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-01-03 12:55 +0100 |
| Message-ID | <XnsA85F8367F974Feejj99@194.109.6.166> |
| In reply to | #34433 |
Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote on 03 Jan 2018 in comp.lang.javascript: > JJ wrote: > >> So, it looks like a web browser issue rather than OS. > > Your logic is flawed. In order to make that determination, you would > have to test at least two browsers with two different settings on the > same operating system. No, one setting with two browsers will do. > With that said, the date and time formats are > usually not determined by the operating system, but by the desktop. The "DESKTOP", realy? I did wrote year in this tread: "Evertjan." wrote on 31 Dec 2017 in comp.lang.javascript: > <!DOCTYPE html> > <script type='text/javascript'> > 'use strict'; > document.write(new Date().toLocaleTimeString()); > > // in Windows 10 Home ver 1709 build 16299.125: > > // '8:26:41 PM' Google Chrome version 64.0.3282.39 > // (Off.B.) beta (64-bit) > > // '20:27:14' Microsoft Edge 41.16299.15.0 > </script> > -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2018-01-04 04:02 -0800 |
| Message-ID | <ffd15de0-98b4-4f44-b52d-1debb4d1747a@googlegroups.com> |
| In reply to | #34433 |
On Wednesday, January 3, 2018 at 1:25:26 AM UTC, Thomas 'PointedEars' Lahn wrote: > JJ wrote: > > > So, it looks like a web browser issue rather than OS. > > Your logic is flawed. In order to make that determination, you would have > to test at least two browsers with two different settings on the same > operating system. No; it is a script engine issue. AIUI, on a fully-Microsoft PC, the script engine DLL is shared between Internet Explorer (and I suppose, Edge), Windows Scripting Host, applications on Microsoft Office, and anything else that wants to use it. Other applications, such as Chrome & Vivaldi, may have their own unshared script engines or may share other engines. And likewise for non-Windows systems. The intent of the original article was to suggest that anyone who writes or maintains code using a toLocale string method of a JavaScript Date object might do well to consider the possible effects of varying what might be considered to be an appropriate format for the string. These include : * Breach of ISO8601 * Displayed string now can be longer and of inconsistent length (in characters and/or ems and/or pixels) * Breaking code logic * Annoyance ECMA please note : Global needs a new Object, containing all of the Locale information in an internationally-defined format, read/write and settable to any specific locality known by the OS. We could then, for example, sit comfortably in Pompey and test our Web pages to find out what the incoming Potarneylanders would see in their own systems, without confusing other applications in our own computers. -- (c) John Stockton, near London, UK. Using Google, no spell-check. | Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |
[toc] | [prev] | [next] | [standalone]
| From | Martin Honnen <martin.honnen@gmx.de> |
|---|---|
| Date | 2018-01-04 13:30 +0100 |
| Message-ID | <p2l6ok$6u9$1@news.albasani.net> |
| In reply to | #34449 |
On 04.01.2018 13:02, Dr J R Stockton wrote: > AIUI, on a fully-Microsoft PC, the script engine DLL is shared between Internet Explorer (and I suppose, Edge), Windows Scripting Host, applications on Microsoft Office, and anything else that wants to use it. That is a thing of the past. IE moved away from the ActiveX based JScript engine long ago. Edge for sure doesn't share the script engine with Windows Script Host, it has its own script engine. The script engine of Edge is under continuous development, the one for IE not. (see for instance the Edge columns at https://kangax.github.io/compat-table/es6/ compared to the IE 11 column) And the engine for WSH hasn't been developed further I think since IE got its own, not ActiveX based one.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2018-01-04 16:48 +0100 |
| Message-ID | <2491699.5yOe22vNvG@PointedEars.de> |
| In reply to | #34449 |
Dr J R Stockton wrote: > On Wednesday, January 3, 2018 at 1:25:26 AM UTC, Thomas 'PointedEars' Lahn > wrote: >> JJ wrote: >> > So, it looks like a web browser issue rather than OS. >> Your logic is flawed. In order to make that determination, you would >> have to test at least two browsers with two different settings on the >> same operating system. > > No; Yes it is. > it is a script engine issue. Evidently not only. To be more precise, and as the method names indicate, it is first determined by the locale, however that is set. For example, LC_TIME=de_CH.UTF-8 firefox-esr causes d.toLocaleString() === "4.1.2018, 16:41:34" while LC_TIME=C firefox-esr causes d.toLocaleString() === "1/4/2018, 4:41:34 PM" for the same Date d, whereas “firefox-esr” starts navigator.userAgent === "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0". > AIUI, on a fully-Microsoft PC […] There is no such thing, and there is not only Microsoft Windows. “JJ” had tested on different *Linux* distributions, without taking into account that the distribution does not determine the date and time format, but first the locale which may be determined by settings of the used desktop (environment)¹, and then the used script engine. ________ ¹ <https://en.wikipedia.org/wiki/Desktop_environment> -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Joao Rodrigues <groups_jr-1@yahoo.com> |
|---|---|
| Date | 2018-01-06 13:02 -0200 |
| Message-ID | <p2qodd$1rd5$1@gioia.aioe.org> |
| In reply to | #34414 |
On 31/12/2017 15:57, Dr J R Stockton wrote:
> All of my PCs are set, everywhere that I have found, to
> use UK, English, and ISO 8601, including the 24-hour clock.
>
> JavaScript new Date().toLocaleTimeString() in up-to-date
> Windows 7, final Windows XP, and probably in Windows 98 &
> maybe even in Windows 3.x, and probably also in previous
> Windows 10, gave the 24-hour clock, "HH:MM:SS"
>
> Today, I allowed a Windows 10 update on my laptop FUJ-2012
> - what arrived was Fall Creators Update, I think.
>
> In the new update, I get "hh:mm:ss PM". I expect to see
> AM tomorrow morning. and an wondering whether the hours
> field will have its leading zero before 10:00; I believe
> I've seen corresponding ineptitude somewhere in UTC time.
>
> That is the case in all of the browsers I tested, which
> are not all that I have.
>
> I don't know what happens in other locales, but it seems
> likely that Evertjan & others will be able to tell us.
>
You may use .toLocaleTimeString() with the new locales and options
arguments [1]:
var date = new Date();
var options = {
year: 'numeric', month: 'numeric', day: 'numeric',
hour: 'numeric', minute: 'numeric', second: 'numeric',
hour12: false,
timeZone: 'GMT' // London - UK
};
console.log(date.toLocaleTimeString('en-GB', options));
// 06/01/2018, 14:57:25
Or use the Intl object from the ECMAScript Internationalization API [2]
directly:
console.log(new Intl.DateTimeFormat('en-GB', options).format(date));
[1]
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString>
[2]
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat>
Cheers,
Joao Rodrigues
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2018-01-06 11:18 -0800 |
| Message-ID | <49e9404e-ae0e-4e2c-ab90-bb1afd2b5409@googlegroups.com> |
| In reply to | #34485 |
On Saturday, January 6, 2018 at 3:02:17 PM UTC, Joao Rodrigues wrote:
> On 31/12/2017 15:57, Dr J R Stockton wrote:
> > All of my PCs are set, everywhere that I have found, to
> > use UK, English, and ISO 8601, including the 24-hour clock.
> > ...
> You may use .toLocaleTimeString() with the new locales and options
> arguments [1]:
>
> var date = new Date();
> var options = {
> year: 'numeric', month: 'numeric', day: 'numeric',
> hour: 'numeric', minute: 'numeric', second: 'numeric',
> hour12: false,
> timeZone: 'GMT' // London - UK
> };
>
> console.log(date.toLocaleTimeString('en-GB', options));
> // 06/01/2018, 14:57:25
toLocaleTimeString SHOULD NOT give the _date_, so either the spec or the implementation is WRONG.
> Or use the Intl object from the ECMAScript Internationalization API [2]
> directly:
>
> console.log(new Intl.DateTimeFormat('en-GB', options).format(date));
It can give the same, but that format is not ISO8601:2004 (which, according to Wikipedia, is the latest). Date field order wrong, date separator wrong. date/time separator wrong. The method appears unknown to IE11 in Win7.
Also, timeZone is a terminological ineptitude; a Time Zone is defined as the set of places which, in local winter, have the same offset from GMT/UTC.
I believe that one current user is closely enough associated with ECMA : please ask ECMA to BUY a current copy of ISO8601 and READ it.
--
(c) John Stockton, near London, UK. Using Google, no spell-check. |
Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |
[toc] | [prev] | [next] | [standalone]
| From | Joao Rodrigues <groups_jr-1@yahoo.com> |
|---|---|
| Date | 2018-01-07 13:07 -0200 |
| Message-ID | <p2td2l$1qgt$1@gioia.aioe.org> |
| In reply to | #34490 |
On 06/01/2018 17:18, Dr J R Stockton wrote:
> On Saturday, January 6, 2018 at 3:02:17 PM UTC, Joao Rodrigues wrote:
>> On 31/12/2017 15:57, Dr J R Stockton wrote:
>>> All of my PCs are set, everywhere that I have found, to
>>> use UK, English, and ISO 8601, including the 24-hour clock.
>>> ...
>
>> You may use .toLocaleTimeString() with the new locales and options
>> arguments [1]:
>>
>> var date = new Date();
>> var options = {
>> year: 'numeric', month: 'numeric', day: 'numeric',
>> hour: 'numeric', minute: 'numeric', second: 'numeric',
>> hour12: false,
>> timeZone: 'GMT' // London - UK
>> };
>>
>> console.log(date.toLocaleTimeString('en-GB', options));
>> // 06/01/2018, 14:57:25
>
>
> toLocaleTimeString SHOULD NOT give the _date_, so either the spec or the implementation is WRONG.
The Date.prototype.toLocaleTimeString method indeed returns a time as a
string value (implementation-dependent) in the current time zone that is
appropriate to the host environment's current locale or a specified locale.
Modern browsers implement the Date.prototype.toLocaleTimeString method
as specified in the ECMA-402 Internationalization API.
In the example above, the locales parameter was specified as 'en-GB' and
the options parameter was used to customise the returning string. I
apologise for adding the date portion in the formatting options as this
was misleading to you, however I only did that to show what can be done
with that parameter.
>
>> Or use the Intl object from the ECMAScript Internationalization API [2]
>> directly:
>>
>> console.log(new Intl.DateTimeFormat('en-GB', options).format(date));
>
> It can give the same, but that format is not ISO8601:2004 (which, according to Wikipedia, is the latest). Date field order wrong, date separator wrong. date/time separator wrong.
As I said above, I used the options parameter to format the returning
string as "date, time", but I recognise that was not a good idea given I
was using the toLocaleTimeString() method. :-(
> The method appears unknown to IE11 in Win7.
As of IE 11 in standards document mode, toLocaleTimeString() uses
Intl.DateTimeFormat internally to format the time, which adds support
for the locales and options arguments:
<https://docs.microsoft.com/en-us/scripting/javascript/reference/tolocaletimestring-method-date-javascript>
But it seems to me that IE 11 doesn't recognise some values for the
options parameter such as "GMT" for timeZone. So I have rewritten the
the example as below to work in IE 11 under Win 10:
var date = new Date();
var options = {
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: false
};
document.write('<p>' + date.toLocaleTimeString('en-GB', options) + '</p>');
>
> Also, timeZone is a terminological ineptitude; a Time Zone is defined as the set of places which, in local winter, have the same offset from GMT/UTC.
>
ECMAScript implementations must recognize at least "UTC" for timeZone in
the options parameter. The default is the runtime's default time zone.
Implementations may also recognize the time zone names of the IANA time
zone database, such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York".
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString>
--
Joao Rodrigues
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2018-01-07 12:19 -0800 |
| Message-ID | <6dcb20f6-7e19-4cb9-b9d5-5f0e4bc7f073@googlegroups.com> |
| In reply to | #34500 |
On Sunday, January 7, 2018 at 3:07:13 PM UTC, Joao Rodrigues wrote: > On 06/01/2018 17:18, Dr J R Stockton wrote: > > On Saturday, January 6, 2018 at 3:02:17 PM UTC, Joao Rodrigues wrote: > >> On 31/12/2017 15:57, Dr J R Stockton wrote: > >>> All of my PCs are set, everywhere that I have found, to > >>> use UK, English, and ISO 8601, including the 24-hour clock. > >>> ... > > Also, timeZone is a terminological ineptitude; a Time Zone is defined as the set of places which, in local winter, have the same offset from GMT/UTC. > > > > ECMAScript implementations must recognize at least "UTC" for timeZone in > the options parameter. The default is the runtime's default time zone. > Implementations may also recognize the time zone names of the IANA time > zone database, such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York". > <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString> ECMA has accepted a terminological ineptitude. The IANA — Time Zone Database at https://www.iana.org/time-zones is not a Time Zone Database : "It is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules.". It has a California address, and it is well known that Americans, especially over on that coast, disregard International Standards, etc. * The proper meaning of Time Zone is that in https://en.wikipedia.org/wiki/Time_zone - "A time zone is a region of the globe that observes a uniform standard time ...". And https://en.wikipedia.org/wiki/Standard_time - "In regions where daylight saving time is used, that time is defined by another offset, from the standard time in its applicable time zones." in which the last two words should be replaced by 'regions' or similar. So the UK (excepting, AIUI, one very small part) and Iceland are in the GMT Time Zone (WET (UTC+0)), even when the UK (but not Iceland) has Summer Time. Granted, Wikipedia is not definitive; but in this case it is right. * The Americans love standards - that is why they make so many different ones of their own whenever the whim takes them. -- (c) John Stockton, near London, UK. Using Google, no spell-check. | Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |
[toc] | [prev] | [next] | [standalone]
| From | Jon Ribbens <jon+usenet@unequivocal.eu> |
|---|---|
| Date | 2018-01-08 11:43 +0000 |
| Message-ID | <slrnp56mbm.236.jon+usenet@sable.unequivocal.eu> |
| In reply to | #34505 |
On 2018-01-07, Dr J R Stockton <J.R.Stockton@physics.org> wrote: > So the UK (excepting, AIUI, one very small part) and Iceland are in > the GMT Time Zone (WET (UTC+0)), even when the UK (but not Iceland) > has Summer Time. Where are you getting this idea that the time zone in the UK should be called "the GMT Time Zone"? It is a contradiction in terms since GMT is not a time zone and the UK is not on GMT during the summer.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2018-01-08 13:26 +0100 |
| Message-ID | <XnsA86488D05EF11eejj99@194.109.6.166> |
| In reply to | #34515 |
Jon Ribbens <jon+usenet@unequivocal.eu> wrote on 08 Jan 2018 in comp.lang.javascript: > On 2018-01-07, Dr J R Stockton <J.R.Stockton@physics.org> wrote: >> So the UK (excepting, AIUI, one very small part) and Iceland are in >> the GMT Time Zone (WET (UTC+0)), even when the UK (but not Iceland) >> has Summer Time. > > Where are you getting this idea that the time zone in the UK should > be called "the GMT Time Zone"? It is a contradiction in terms since > GMT is not a time zone and the UK is not on GMT during the summer. No, John is right. The "time-zone" does not change during summer-time time-shift, as time-zone defines a zone, read region, not a time. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Jon Ribbens <jon+usenet@unequivocal.eu> |
|---|---|
| Date | 2018-01-08 16:36 +0000 |
| Message-ID | <slrnp577fq.236.jon+usenet@sable.unequivocal.eu> |
| In reply to | #34517 |
On 2018-01-08, Evertjan. <exxjxw.hannivoort@inter.nl.net> wrote: > Jon Ribbens <jon+usenet@unequivocal.eu> wrote on 08 Jan 2018 in > comp.lang.javascript: >> Where are you getting this idea that the time zone in the UK should >> be called "the GMT Time Zone"? It is a contradiction in terms since >> GMT is not a time zone and the UK is not on GMT during the summer. > > No, John is right. > > The "time-zone" does not change during summer-time time-shift, > as time-zone defines a zone, read region, not a time. Obviously I'm not denying that the UK (currently) has a time zone. What I would like is a reference that someone with the authority to do so has given that time zone the exceedingly misleading name of "GMT".
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2018-01-08 06:09 -0800 |
| Message-ID | <f50bfebd-bc68-460c-b3ff-d28e6595d120@googlegroups.com> |
| In reply to | #34515 |
On Monday, January 8, 2018 at 11:44:00 AM UTC, Jon Ribbens wrote: > On 2018-01-07, Dr J R Stockton <...> wrote: > > So the UK (excepting, AIUI, one very small part) and Iceland are in > > the GMT Time Zone (WET (UTC+0)), even when the UK (but not Iceland) > > has Summer Time. > > Where are you getting this idea that the time zone in the UK should > be called "the GMT Time Zone"? It is a contradiction in terms since > GMT is not a time zone and the UK is not on GMT during the summer. I get the idea from reading truly authoritative sources of information, such as, but not necessarily all of, and not only, NPL, BIPM, NIST - and by remembering that Microsoft is unreliable. By law, UK Time is GMT-based (unless the law has changed); but in actuality UK time is UTC-based, in all parts, and the Summer Time offset is an hour ahead of Winter Time. AISB, a Time Zone is defined as a set of places which have the same Standard Time offset from GMT/UTC - and Standard Time is Winter Time, with Summer Time being offset forward from that (in practice, by a multiple of 30 minutes). ((( The delightful story that the Irish, realising that Summer Time lasts longer than Winter Time, decided to use GMT+1 as their Standard Time and set their clocks back by an hour for Winter is presumed to be untrue. Alas. ))) Most computers, although intermittently synchronised to a UTC source, actually use GMT+drift, since they ignore Leap Seconds. -- (c) John Stockton, near London, UK. Using Google, no spell-check. | Mail: J.R.""""""""@physics.org - or as Reply-To, if any. |
[toc] | [prev] | [next] | [standalone]
| From | Jon Ribbens <jon+usenet@unequivocal.eu> |
|---|---|
| Date | 2018-01-08 16:33 +0000 |
| Message-ID | <slrnp577bh.236.jon+usenet@sable.unequivocal.eu> |
| In reply to | #34518 |
On 2018-01-08, Dr J R Stockton <J.R.Stockton@physics.org> wrote: > On Monday, January 8, 2018 at 11:44:00 AM UTC, Jon Ribbens wrote: >> Where are you getting this idea that the time zone in the UK should >> be called "the GMT Time Zone"? It is a contradiction in terms since >> GMT is not a time zone and the UK is not on GMT during the summer. > > I get the idea from reading truly authoritative sources of > information, such as, but not necessarily all of, and not only, NPL, > BIPM, NIST - and by remembering that Microsoft is unreliable. It's Microsoft that (falsely/misleadingly) claims that the UK's time zone is "GMT". What is your reason for agreeing with them? "NPL BIPM NIST" is not a cite. > AISB, a Time Zone is defined as a set of places which have the same > Standard Time offset from GMT/UTC - and Standard Time is Winter > Time, with Summer Time being offset forward from that (in practice, > by a multiple of 30 minutes). Yes. None of that contradicts the facts that GMT is not a Time Zone, and also the time in the UK in the summer is not GMT.
[toc] | [prev] | [next] | [standalone]
| From | "Mark-" <nospam@mapson.xyz> |
|---|---|
| Date | 2018-01-08 18:58 +0000 |
| Message-ID | <p30f0k$i1j$1@gioia.aioe.org> |
| In reply to | #34519 |
Jon Ribbens wrote: > Yes. None of that contradicts the facts that GMT is not a Time Zone... What? GMT IS a time zone (UTC + 0). Countless sources state GMT as a time zone. Just one of thousands, https://www.timeanddate.com/time/zones/
[toc] | [prev] | [next] | [standalone]
| From | Jon Ribbens <jon+usenet@unequivocal.eu> |
|---|---|
| Date | 2018-01-08 19:33 +0000 |
| Message-ID | <slrnp57hsf.236.jon+usenet@sable.unequivocal.eu> |
| In reply to | #34521 |
On 2018-01-08, Mark- <nospam@mapson.xyz> wrote: > Jon Ribbens wrote: >> Yes. None of that contradicts the facts that GMT is not a Time Zone... > > What? > > GMT IS a time zone (UTC + 0). Please read the thread. As everyone is agreed, a Time Zone is a geographic area or set of areas which use a common time standard. "GMT" is not a geographic area, it *is* a time standard, and one which in summer time does not equal the time used in the UK.
[toc] | [prev] | [next] | [standalone]
Page 1 of 5 [1] 2 3 4 5 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web