473,847 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.demo n.co.uk/misctime.htm#Zo nes>,
<URL:http://www.merlyn.demo n.co.uk/js-date0.htm#TP>.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demo n.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demo n.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 2240
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.de mon.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:n ew 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.demo n.co.uk/uksumtim.htm#El se> 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.demo n.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demo n.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.demo n.co.uk/uksumtim.htm#El se> 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.c om'

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************ *********@twist er.nyroc.rr.com >, dated
Tue, 5 Oct 2004 14:25:25, seen in news:comp.lang. javascript, Mick White
<mw******@BOGUS rochester.rr.co m> 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").toUTCS tring()

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.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.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").toUTCS tring()
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.demo n.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demo n.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=%22eas tern+standard+t ime%22+australi a>
53,300 hits
OTOH, confusingly, Easter *Summer* Time..
<http://www.google.com/search?q=%22eas tern+summer+tim e%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

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

Similar topics

3
1509
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 01/01/02 1 6 C 01/02/02 1 7 A 02/03/02 1
9
4108
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 my site, where there would be a paragraph produced by Javascript to say: 1995: Something notable happened 2001: Something else of note happened I found something similar on http://www.freesticky.com, but it isn't really
13
3098
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 across "null" string. I know that I will get an "undefined" when I try to retrieve something from the DOM which doesn't exist. I have used null myself to initialize or reset variables. But in which
1
3380
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 date. I'm should have the date of the input into the function + or - the integer in the task_due_days field. for example (cdate("1/1/2002")+30) as task_due_date What am I doing wrong?
16
9332
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 mm/yyyy". Means: if the user enters "10/2004 - 10/2005" everything between "2004-10-01" and "2004-10-31" is selected.
2
1796
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 Thanks, Mark
3
1312
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 below... --
0
1366
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: "http://WKSI105080A22/WebService2/Multiply" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1
8213
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 other (or other consumers) via SOAP, I want to generate SOAP-messages in XML manually and send it via POST-method to the hosting server. But whenever I try to use HttpWebRequest-Class to get a response from a webservice, I get an "Internal Server...
0
9733
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10652
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9489
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7887
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5724
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5914
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4126
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3167
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.