Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32823 > unrolled thread
| Started by | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| First post | 2017-03-20 16:42 -0700 |
| Last post | 2017-03-21 16:37 +0100 |
| Articles | 10 — 3 participants |
Back to article view | Back to comp.lang.javascript
Another JScript date/time bug, it seems Dr J R Stockton <J.R.Stockton@physics.org> - 2017-03-20 16:42 -0700
Re: Another JScript date/time bug, it seems "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-03-21 10:30 +0100
Re: Another JScript date/time bug, it seems Dr J R Stockton <J.R.Stockton@physics.org> - 2017-03-21 12:29 -0700
Re: Another JScript date/time bug, it seems Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-03-22 09:09 +0100
Re: Another JScript date/time bug, it seems Dr J R Stockton <J.R.Stockton@physics.org> - 2017-03-22 02:13 -0700
Re: Another JScript date/time bug, it seems Dr J R Stockton <J.R.Stockton@physics.org> - 2017-03-23 09:22 -0700
Re: Another JScript date/time bug, it seems Dr J R Stockton <J.R.Stockton@physics.org> - 2017-03-26 05:45 -0700
Re: Another JScript date/time bug, it seems "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-03-26 17:42 +0200
Re: Another JScript date/time bug, it seems Dr J R Stockton <J.R.Stockton@physics.org> - 2017-03-28 08:16 -0700
Re: Another JScript date/time bug, it seems Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-03-21 16:37 +0100
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2017-03-20 16:42 -0700 |
| Subject | Another JScript date/time bug, it seems |
| Message-ID | <2c32354c-7b9c-41b4-8366-8cba6d020edb@googlegroups.com> |
Note date/time of posting. Please test in Europe while still Winter Time, and in US/CA !! My Location : Greater London Op Sys : Win XP sp3, up-to-date SubSys : Command Prompt TIME : 2017-03-20 23:37 Approx SCREEN : Prompt>echo.|date The current date is: 2017-03-20 Enter the new date: (yy-mm-dd) Prompt>echo.|time The current time is: 23:37:25.95 Enter the new time: Prompt>type $kk.js WScript.StdErr.WriteLine(new Date()) Prompt>cscript //nologo $kk.js Tue Mar 21 00:37:36 UTC+0100 2017 Prompt>echo.|date The current date is: 2017-03-20 Enter the new date: (yy-mm-dd) Prompt>echo.|time The current time is: 23:37:56.78 Enter the new time: AMAZEMENT! -- (c) John Stockton, near London, UK. Using Google, no spell-check. | Mail: J.R.""""""""@physics.org
[toc] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2017-03-21 10:30 +0100 |
| Message-ID | <XnsA73F6AEC27BFBeejj99@194.109.6.166> |
| In reply to | #32823 |
Dr J R Stockton <J.R.Stockton@physics.org> wrote on 21 Mar 2017 in comp.lang.javascript: > Note date/time of posting. > > Please test in Europe while still Winter Time, and in US/CA !! > > My Location : Greater London > Op Sys : Win XP sp3, up-to-date > SubSys : Command Prompt > TIME : 2017-03-20 23:37 Approx > SCREEN : > > > Prompt>echo.|date > The current date is: 2017-03-20 > Enter the new date: (yy-mm-dd) > > Prompt>echo.|time > The current time is: 23:37:25.95 > Enter the new time: > > Prompt>type $kk.js > WScript.StdErr.WriteLine(new Date()) > > > Prompt>cscript //nologo $kk.js > Tue Mar 21 00:37:36 UTC+0100 2017 > > Prompt>echo.|date > The current date is: 2017-03-20 > Enter the new date: (yy-mm-dd) > > Prompt>echo.|time > The current time is: 23:37:56.78 > Enter the new time: > > > AMAZEMENT! Must be a severe case of Brexitis mayensis, since overhere: Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Users\Evertjan>echo.|time The current time is: 10:17:52.76 Enter the new time: C:\Users\Evertjan>echo.|date The current date is: 21-03-2017 Enter the new date: (dd-mm-yy) C:\Users\Evertjan>echo WScript.StdErr.WriteLine(new Date()) >kk.js C:\Users\Evertjan>type kk.js WScript.StdErr.WriteLine(new Date()) C:\Users\Evertjan>cscript //nologo kk.js Tue Mar 21 10:21:11 UTC+0100 2017 Seriously, May may, like the Mau Mau, have nothing to do with it, just your [nonreported] version of c//wscript engine, perhaps? Or that of the O.S.? -- 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 | 2017-03-21 12:29 -0700 |
| Message-ID | <b0cfdd26-6767-4f46-abf1-124b6351ac38@googlegroups.com> |
| In reply to | #32826 |
On Tuesday, March 21, 2017 at 9:30:48 AM UTC, Evertjan. wrote:
> Dr J R Stockton <J.R.Stockton@p*.o*> wrote on 21 Mar 2017 in
> comp.lang.javascript:
>
> > Note date/time of posting.
8<------------------------------------------------------------------------
:: THIS IS *ALL* $kk.bat
@echo WScript.StdErr.WriteLine(" This is $kk.js output :-") > $kk.js
@echo WScript.StdErr.WriteLine(" CMD.EXE says %date% %time%") >> $kk.js
@echo WScript.StdErr.WriteLine(" WScript says " + new Date()) >> $kk.js
type $kk.js
@echo.
@cscript //nologo $kk.js
@del $kk.js
@echo.
@goto ZZZZ
Results, testing in UK
on Tuesday 21 Mar 2017 : US Summer Time, EU Winter Time :-
Windows XP sp3 :-
CMD.EXE says 2017-03-21 11:39:14.96
WScript says Tue Mar 21 12:39:15 UTC+0100 2017
Windows 7 :-
CMD.EXE says 2017-03-21 11:35:56.38
WScript says Tue Mar 21 12:35:56 UTC+0100 2017
Windows 10 :-
CMD.EXE says 2017-03-21 12:22:10.85
WScript says Tue Mar 21 13:22:10 UTC+0100 2017
I've not yet managed to get the JScript version and build numbers.
"Web" JScript executed in MSIE in those systems here today correctly uses
EU Winter Time, OK.
So, we can say that, probably over the interval in which US & UK differ
as to whether it is Summer Time, 1/24 of the time JScript does not
even know which day of the week it is.
Summer Time note to WSOTP : NA starts 2nd Sun Mar, EU on last Sun Mar.
:ZZZZ
8<------------------------------------------------------------------------
--
(c) John Stockton, near London, UK. Using Google, no spell-check. |
Mail: J.R.""""""""@physics.org |
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-03-22 09:09 +0100 |
| Message-ID | <3147209.R56niFO833@PointedEars.de> |
| In reply to | #32829 |
Dr J R Stockton wrote: > I've not yet managed to get the JScript version and build numbers. ScriptEngine() + " " + ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." + ScriptEngineBuildVersion() -- 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 | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2017-03-22 02:13 -0700 |
| Message-ID | <79740c78-fad3-46e8-b9c6-8123e6213d04@googlegroups.com> |
| In reply to | #32832 |
On Wednesday, March 22, 2017 at 8:09:09 AM UTC, Thomas 'PointedEars' Lahn wrote: > Dr J R Stockton wrote: > > > I've not yet managed to get the JScript version and build numbers. > > ScriptEngine() + " " + ScriptEngineMajorVersion() + "." + > ScriptEngineMinorVersion() + "." + ScriptEngineBuildVersion() Too late to be useful.
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2017-03-23 09:22 -0700 |
| Message-ID | <914e2a3b-168b-49ab-bde2-86e18481cd1f@googlegroups.com> |
| In reply to | #32829 |
On Tuesday, March 21, 2017 at 7:29:15 PM UTC, Dr J R Stockton wrote:
> On Tuesday, March 21, 2017 at 9:30:48 AM UTC, Evertjan. wrote:
> > Dr J R Stockton <J.R.Stockton@p*.o*> wrote on 21 Mar 2017 in
> > comp.lang.javascript:
Similar to two days ago, but neatened, reporting versions, and done on 4 PCs -
I _guess_ that the discrepancy will vanish at 01:00 GMT on Sunday 26th.
8<------------------------------------------------------------------------
@echo # Batch file DATE-BUG.BAT, © JRS 2017-03-23+,
@echo # creating showing and executing DATE-BUG.JS, begins
@if exist DATE-BUG.JS del DATE-BUG.JS
@echo var WS = WScript.StdErr >> DATE-BUG.JS
@echo WS.WriteLine( >> DATE-BUG.JS
@echo " Script Engine = " + ScriptEngine() + >> DATE-BUG.JS
@echo ", version = " + ScriptEngineMajorVersion() + >> DATE-BUG.JS
@echo "." + ScriptEngineMinorVersion() + >> DATE-BUG.JS
@echo ", build " + ScriptEngineBuildVersion()) >> DATE-BUG.JS
@echo WS.WriteLine(" CMD.EXE says %date% %time%") >> DATE-BUG.JS
@echo WS.WriteLine(" WScript says " + new Date()) >> DATE-BUG.JS
@echo.^|
@echo * Script DATE-BUG.JS begins
@type DATE-BUG.JS
@echo * Script DATE-BUG.JS ends
@echo.^|
@ver
@echo COMPUTERNAME=%COMPUTERNAME%, OSVER=%OSVER%, VERSION=%VERSION%
@echo + Script DATE-BUG.JS output begins
@cscript //nologo DATE-BUG.JS
@echo + Script DATE-BUG.JS output ends
@del DATE-BUG.JS
@echo.^|
@echo # One hour error in UK time seen when US/UK GMT offset unusual?
@goto ZZZZ
On Thursday 23 Mar 2017 : US Summer Time, EU Winter Time
Testing in UK :-
Windows XP sp3 :-
Microsoft Windows XP [Version 5.1.2600]
COMPUTERNAME=MEL01421, OSVER=winXPP, VERSION=3.0.5.001
+ Script DATE-BUG.JS output begins
Script Engine = JScript, version = 5.8, build 23259
CMD.EXE says 2017-03-23 15:12:30.38
WScript says Thu Mar 23 16:12:30 UTC+0100 2017
+ Script DATE-BUG.JS output ends
Windows 7 :-
Microsoft Windows [Version 6.1.7601]
COMPUTERNAME=MEL-1632, OSVER=, VERSION=
+ Script DATE-BUG.JS output begins
Script Engine = JScript, version = 5.8, build 18618
CMD.EXE says 2017-03-23 15:25:13.23
WScript says Thu Mar 23 16:25:13 UTC+0100 2017
+ Script DATE-BUG.JS output ends
|
Windows 10 :-
Microsoft Windows [Version 10.0.14393]
COMPUTERNAME=FUJ-2012, OSVER=, VERSION=
+ Script DATE-BUG.JS output begins
Script Engine = JScript, version = 5.8, build 16384
CMD.EXE says 2017-03-23 15:33:24.81
WScript says Thu Mar 23 16:33:24 UTC+0100 2017
+ Script DATE-BUG.JS output ends
Windows 10 :-
Microsoft Windows [Version 10.0.14393]
COMPUTERNAME=MEL01627, OSVER=, VERSION=
+ Script DATE-BUG.JS output begins
Script Engine = JScript, version = 5.8, build 16384
CMD.EXE says 2017-03-23 16:04:52.71
WScript says Thu Mar 23 17:04:53 UTC+0100 2017
+ Script DATE-BUG.JS output ends
Javascript executed in MSIE in those systems here on the previous
Tuesday correctly used EU Winter Time.
So, we can say that, probably over the interval in which US & UK differ
as to whether it is Summer Time, 1/24 of the time JScript does not
even know which day of the week it is.
Summer Time note for WSOTP :
NA from 2nd Sun Mar to 1st Sun Nov, change at 02:00 local;
EU from last Sun Mar to last Sun Oct, change at 01:00 GMT.
:ZZZZ
@echo # Batch file DATE-BUG.BAT ends
@echo.
8<------------------------------------------------------------------------
--
(c) John Stockton, near London, UK. Using Google, no spell-check. |
Mail: J.R.""""""""@physics.org |
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <J.R.Stockton@physics.org> |
|---|---|
| Date | 2017-03-26 05:45 -0700 |
| Message-ID | <30a6a5ee-5c62-43e3-b3e7-062d92654269@googlegroups.com> |
| In reply to | #32838 |
On Thursday, March 23, 2017 at 4:22:15 PM UTC, Dr J R Stockton wrote: > On Tuesday, March 21, 2017 at 7:29:15 PM UTC, Dr J R Stockton wrote: > > On Tuesday, March 21, 2017 at 9:30:48 AM UTC, Evertjan. wrote: > > > Dr J R Stockton <J.R.Stockton@p*.o*> wrote on 21 Mar 2017 in > > > comp.lang.javascript: > > > Similar to two days ago, but neatened, reporting versions, and done on 4 PCs - > I _guess_ that the discrepancy will vanish at 01:00 GMT on Sunday 26th. Retested on all four PCs on Sunday afternoon. Results are now correct. -- (c) John Stockton, near London, UK. Using Google, no spell-check. | Mail: J.R.""""""""@physics.org |
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2017-03-26 17:42 +0200 |
| Message-ID | <XnsA744B41029B6Deejj99@194.109.6.166> |
| In reply to | #32846 |
Dr J R Stockton <J.R.Stockton@physics.org> wrote on 26 Mar 2017 in comp.lang.javascript: > On Thursday, March 23, 2017 at 4:22:15 PM UTC, Dr J R Stockton wrote: >> On Tuesday, March 21, 2017 at 7:29:15 PM UTC, Dr J R Stockton wrote: >> > On Tuesday, March 21, 2017 at 9:30:48 AM UTC, Evertjan. wrote: >> > > Dr J R Stockton <J.R.Stockton@p*.o*> wrote on 21 Mar 2017 in >> > > comp.lang.javascript: >> >> >> Similar to two days ago, but neatened, reporting versions, and done on >> 4 PCs - I _guess_ that the discrepancy will vanish at 01:00 GMT on >> Sunday 26th. > > Retested on all four PCs on Sunday afternoon. Results are now correct. Would this have helped, I use it serverside for servers in Toronto: let timeZoneOffsetHours = new Date().getTimezoneOffset()/60; -- 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 | 2017-03-28 08:16 -0700 |
| Message-ID | <d8ec92e0-3fb6-485a-aaa8-18d25fa95f37@googlegroups.com> |
| In reply to | #32847 |
On Sunday, March 26, 2017 at 4:42:29 PM UTC+1, Evertjan. wrote: > Dr J R Stockton <J.R.S......n@phisycs.awg> wrote on 26 Mar 2017 in > comp.lang.javascript: > > Retested on all four PCs on Sunday afternoon. Results are now correct. > > Would this have helped, I use it serverside for servers in Toronto: > > let timeZoneOffsetHours = new Date().getTimezoneOffset()/60; I've put it on (with /-60 - the cack-handed US programmers should have programmed it as offset *from* GMT) - but it only helps for those who know what their offset should be and I think the error is made more obvious by showing the times. Readers be aware that, although Brazil mostly changes the clocks in Spring and Autumn with dates given by rules like ours, there is a one-week postponement every few years in places like Sao Paulo. Microsoft may not know that. -- (c) John Stockton, near London, UK. Using Google, no spell-check. | Mail: J.R.""""""""@physics.org |
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2017-03-21 16:37 +0100 |
| Message-ID | <3025927.QJadu78ljV@PointedEars.de> |
| In reply to | #32823 |
Dr J R Stockton wrote: > Note date/time of posting. > > Please test in Europe while still Winter Time, and in US/CA !! > > My Location : Greater London > Op Sys : Win XP sp3, up-to-date “up-to-date” is relative. There has not been a significant update for Windows XP, including its JScript engine, since 2014-05-01 when there had been, unusually, an emergency security patch released after the OS’s end-of- life (end of the Extended Support phase) on 2014-04-08. The final update was for its Security Essentials virus definitions and Malicious Software Removal Tool in 2015-07. ,-<https://en.wikipedia.org/wiki/Windows_XP#End_of_support> | | […] | Windows XP is remotely exploitable by numerous security holes that were | discovered after Microsoft stopped supporting Windows XP. -- 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] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web