473,386 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

new Date("2001/1/1 0:0:0R")


Javascript date strings can have a one-letter postfix; it is taken as
indicating time zone (not J, which causes NaN).
// IIRC, VB accepts A & P in that location, for AM & PM.

In my MS IE 4, the object generated by new Date("2001/1/1 0:0:0R")
has value meaning Sun Dec 31 19:00:00 UTC 2000.

That combination of local time and UTC corresponds, AIUI, to Tashkent
and Karachi, in Asia (and not to any US towns of the same name).

RFC 0822 authorises that notation in news/mail headers, apparently with
that sense.

However, AIUI, the US military use letter postfixes for time zones, in
the inverse sense - R Romeo being Winter Time on the US East Coast (and
I think J being Local Time).

RFC 2822 says 0822 got it wrong, and therefore disallows the notation in
headers.

ECMA 262 seems not to define the contents of date strings.
What do other browsers show for new Date("2001/1/1 0:0:0R") ?
<URL:http://www.merlyn.demon.co.uk/misctime.htm#Zones>,
<URL:http://www.merlyn.demon.co.uk/js-date0.htm#TP>.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #1
13 2197
On Mon, 4 Oct 2004 21:28:03 +0100, Dr John Stockton wrote:
What do other browsers show for new Date("2001/1/1 0:0:0R") ?


using this string in the address area..
javascript:new Date("2001/1/1 0:0:0R")

I got...
IE 6.0026 "Mon Jan 1 06:00:00 UTC+1100 2001"
Moz. 1.7.2 "Invalid Date"
Opera 6.54 "Mon, 01 Jan 2001 00:00:00 GMT+1100"
NN 4.78 "Invalid Date"

That was about 8:29am, Tue 5th Oct 2004, if that's relevant
(..actually it was about that time even if it's not relevant)

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 23 '05 #2
On Mon, 4 Oct 2004 21:28:03 +0100, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:

[snip]
What do other browsers show for new Date("2001/1/1 0:0:0R") ?


Using: document.write(new Date("2001/1/1 0:0:0R"));

Opera 7.54: Mon, 01 Jan 2001 00:00:00 GMT+0000
IE 6.0.2900.2180: Sun Dec 31 19:00:00 UTC 2000
Gecko[1]: Invalid Date
NN4: Invalid Date

Mike
[1] All major Mozilla versions from 1.0 to 1.7, plus 1.7.3. Also includes
Firefox 0.9.3 and Netscape 7.2.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3
Michael Winter wrote:
[snip]
Using: document.write(new Date("2001/1/1 0:0:0R"));

Opera 7.54: Mon, 01 Jan 2001 00:00:00 GMT+0000
IE 6.0.2900.2180: Sun Dec 31 19:00:00 UTC 2000
Gecko[1]: Invalid Date
NN4: Invalid Date

and in Safari 1.0.3 (v85.8):

document.write(new Date("2001/1/1 0:0:0R"));

gives:

Sun Oct 25 1959 00:00:00 GMT+1000
regarless of the trailing character (R,S,T,Z,G,'' tested)

Fred.
Jul 23 '05 #4
Dr John Stockton wrote:

What do other browsers show for new Date("2001/1/1 0:0:0R") ?


Safari 1.0.3: Sun Oct 25 1959 00:00:00 GMT-0400
Mozilla 1.6: Invalid Date
FF 0.9: Invalid Date
Camino 0.8b: Invalid Date
IE 5.2: Sun Dec 31 15:00:00 EDT 2000

All Mac
Mick
Jul 23 '05 #5
JRS: In article <1q******************************@40tude.net>, dated
Mon, 4 Oct 2004 22:34:32, seen in news:comp.lang.javascript, Andrew
Thompson <Se********@www.invalid> posted :
Date: Mon, 04 Oct 2004 22:34:32 GMT X-Trace: news-server.bigpond.net.au 1096929272 203.51.78.166 (Tue, 05 Oct 2004
08:34:32 EST) On Mon, 4 Oct 2004 21:28:03 +0100, Dr John Stockton wrote:
What do other browsers show for new Date("2001/1/1 0:0:0R") ?


using this string in the address area..
javascript:new Date("2001/1/1 0:0:0R")

I got...
IE 6.0026 "Mon Jan 1 06:00:00 UTC+1100 2001"
Moz. 1.7.2 "Invalid Date"
Opera 6.54 "Mon, 01 Jan 2001 00:00:00 GMT+1100"
NN 4.78 "Invalid Date"

That was about 8:29am, Tue 5th Oct 2004, if that's relevant
(..actually it was about that time even if it's not relevant)


But I collected the article at about 07:45 on that date <G>.
R being a 5-hour offset of uncertain sign, it's a bit confusing with you
being +1100 and using an AU server on the verge of antipodean Summer.

I think your IE6 gets the same UTC as I do, Sun Dec 31 19:00:00 UTC 2000
I think Opera ignored the postfix R.

These postfixes seem wholly untrustworthy.

AFAICS, +1100 currently means EITHER located in Tasmania Summer (or some
tiny islands, or Siberia) ; OR that
<URL:http://www.merlyn.demon.co.uk/uksumtim.htm#Else> is wrong. ??.
Your server seems to be in East Coast winter still, EST being 10 hours
ahead of GMT.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #6
On Tue, 5 Oct 2004 14:37:25 +0100, Dr John Stockton wrote:
....
AFAICS, +1100 currently means EITHER located in Tasmania Summer (or some
tiny islands, or Siberia) ; OR that
<URL:http://www.merlyn.demon.co.uk/uksumtim.htm#Else> is wrong. ??.
Your server seems to be in East Coast winter still, EST being 10 hours
ahead of GMT.


...Ummmm. I am not sure I follow you here, but I did some
further checking and noticed that in my 'Regional and Language
Options' it has defaulted to 'English - US' with the location
set to 'United States'.*

But wait.. here's the more relevant settings.
'Date and Time Properties'
'TimeZone' set to ..
(GMT+10:00) Canberra, Melbourne, Sydney
with 'automatically adjust clock for daylight saving' enabled..
'Internet Time'
It is apparently auto-synching the internal clock
to 'time.windows.com'

You want me to knock the 'Language/Regional' into some
semblance of reality and try again?

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 23 '05 #7
JRS: In article <p9*********************@twister.nyroc.rr.com>, dated
Tue, 5 Oct 2004 14:25:25, seen in news:comp.lang.javascript, Mick White
<mw******@BOGUSrochester.rr.com> posted :
Dr John Stockton wrote:

What do other browsers show for new Date("2001/1/1 0:0:0R") ?

Safari 1.0.3: Sun Oct 25 1959 00:00:00 GMT-0400


That's impressively wrong.
Mozilla 1.6: Invalid Date
FF 0.9: Invalid Date
Camino 0.8b: Invalid Date
IE 5.2: Sun Dec 31 15:00:00 EDT 2000


EDT for a winter date? EDT in Australia?

One should really look at new Date("2001/1/1 0:0:0R").toUTCString()

The correct answer is, I believe, Mon, 1 Jan 2001 05:00:00 UTC or
local equivalent; but RFCs reversed the military standard..
Clearly, however,
(a) The notation is unsafe in javascript
(b) But worth knowing of, as it explains why such as
01:02:03A and 02:03:04P are not taken as AM and PM.
Fred Oz, in AU, with Safari, got similarly
Sun Oct 25 1959 00:00:00 GMT+1000
regardless of the trailing character (R,S,T,Z,G,'' tested)

That deserves further testing; it appears that "YYYY/M/D" is perhaps
misunderstood, and I had thought that to be safe. Changing each of
Y,M,D slightly may provide clues.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #8
JRS: In article <15*******************************@40tude.net>, dated
Tue, 5 Oct 2004 18:36:38, seen in news:comp.lang.javascript, Andrew
Thompson <Se********@www.invalid> posted :

You want me to knock the 'Language/Regional' into some
semblance of reality and try again?


No need; it is already clear that the notation is never right (i.e.
apart from Z, != military notation, being reversed) and in its manner of
being wrong is not reliable. But knowledge of it might be useful, to
explain

It would indeed have been better if I had put
new Date("2001/1/1 0:0:0R").toUTCString()
since local time where January is in Summer and when it's near the
equinoxes only adds potential for error.

But I would be pleased to hear whether EST in your header stands for
Eastern Standard Time or something else, and what the summer/winter
terms are for various parts of Australia (& Lord Howe Island!).

If you're near Glen Innes, I might be able to get you offered a cup of
tea.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #9
On Wed, 6 Oct 2004 14:36:51 +0100, Dr John Stockton wrote:
But I would be pleased to hear whether EST in your header stands for
Eastern Standard Time or something else,
....errrr. As far as I know, yes.

*But* I did a quick search and found ..
<http://www.google.com/search?q=%22eastern+standard+time%22+australia>
53,300 hits
OTOH, confusingly, Easter *Summer* Time..
<http://www.google.com/search?q=%22eastern+summer+time%22+australia>
657 hits..

Whereas this page* assures me we must currently be in non-daylight
saving time, so that header *must* correspond to the former..
<http://webexhibits.org/daylightsaving/g.html>

(weak grin) Are you getting the picture that I am not
especially good at this 'time' thing. Heck, I have
enough trouble keeping track of what day it is.
TV might help in cases like this, but I find TV boring,
and don't own one. My record thus far is going half
a month without realising we'd changed to/from daylight
saving.
If you're near Glen Innes, I might be able to get you offered a cup of
tea.


Oh dear. I don't think I'm gonna score that cuppa' somehow. ;-)
Jul 23 '05 #10
Dr John Stockton wrote:
IE 5.2: Sun Dec 31 15:00:00 EDT 2000
[snip]
EDT for a winter date? EDT in Australia?


Rochester, NY, USA: Eastern Daylight Savings Time

Mick
Jul 23 '05 #11
On Wed, 06 Oct 2004 22:40:17 GMT, Mick White
<mw******@BOGUSrochester.rr.com> wrote:
Dr John Stockton wrote:
IE 5.2: Sun Dec 31 15:00:00 EDT 2000

[snip]

EDT for a winter date? EDT in Australia?


Rochester, NY, USA: Eastern Daylight Savings Time


In mid-december? When does Rochester go off daylight savings then?
or does it not? is there a double daylight savings in summer as is
often proposed in the UK?

Jim.
Jul 23 '05 #12
JRS: In article <lv*********************@twister.nyroc.rr.com>, dated
Wed, 6 Oct 2004 22:40:17, seen in news:comp.lang.javascript, Mick White
<mw******@BOGUSrochester.rr.com> posted :
Dr John Stockton wrote:
IE 5.2: Sun Dec 31 15:00:00 EDT 2000

[snip]

EDT for a winter date? EDT in Australia?


Rochester, NY, USA: Eastern Daylight Savings Time


You had Daylight Savings Time in _December_ 2000? That surprises me.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #13
IE 5.2: Sun Dec 31 15:00:00 EDT 2000
Rochester, NY, USA: Eastern Daylight Savings Time

You had Daylight Savings Time in _December_ 2000? That surprises me.


No I didn't, but that's how the UA presented the date...
Mick
Jul 23 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lilian BRUN | last post by:
I have a table State_history : Id State DateModif object_id 1 A 10/10/01 1 2 B 10/11/01 1 3 B 11/11/01 1 4 B 11/12/01 1 5 C ...
9
by: Marcus Sheen [UK] | last post by:
Have done searches for similar questions, but cannot find anything. Nor can I find any resources via Google (Javascript Source etc). Thinking about implementing a topical "On This Day" feature on...
13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
1
by: stoppal | last post by:
I have the below function written in VB, and everything works fine EXCEPT that the sql code is not executing correctly. The date field is in the table always shows "12/1/1899 11:59:17 PM" no other...
16
by: Bernd Hohmann | last post by:
Hi there, we're currently convert an old ISAM application to Java and DB2. Among the load of problems we found the reports which have user selections like "select all data between mm/yyyy and...
2
by: mark | last post by:
How can I use "Group By" or a formula to group my query results in 1-year periods from a given date, e.g. 3 groups: 1 Sept 2001 - 1 Sept 2002 1 Sept 2002 - 1 Sept 2003 1 Sept 2003 - 1 Sept 2004 ...
3
by: Stephen Gennard | last post by:
Hello, I having a problem dynamically invoking a static method that takes a reference to a SByte*. If I do it directly it works just fine. Anyone any ideas why? I have include a example...
0
by: Noam_h | last post by:
Hi all. Calling this web service: POST /WebService2/Service1.asmx HTTP/1.1 Host: WKSI105080A22 Content-Type: text/xml; charset=utf-8 Content-Length: 396 SOAPAction:...
1
by: Tito Meinrath | last post by:
Hi, I'm really going mad about this! Currently I'm designing a student course on web services. Because I want them to understand what's really going on when web services correspond with each...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.