Article View: comp.lang.javascript
Article #191Re: JavaScript date formatting with Linux Netscape
From: Otto J. Makela
Date: Thu, 20 Jul 2000 00:00
Date: Thu, 20 Jul 2000 00:00
70 lines
4021 bytes
4021 bytes
Dr John Stockton <jrs@merlyn.demon.co.uk> writes:
> JRS: In article <IaEea7BMmjd5EwEJ@merlyn.demon.co.uk> of Thu, 20 Jul
> 2000 00:28:12 seen in news:comp.lang.javascript, Dr John Stockton
> <jrs@merlyn.demon.co.uk> wrote:
> >JRS: In article <m31z0qz0gh.fsf@funland.helsinki.sonera.fi> of Wed, 19
> >>Dr John Stockton <jrs@merlyn.demon.co.uk> writes:
> >>> See whether <URL: http://www.merlyn.demon.co.uk/jswkcalc.htm> can be
> >>> added to that list!
> >
> >That lastModified looks to me as if the server did not transfer a good
> >lastModified date to you.
> >
> >I revised the page today, in the light of increased knowledge, so it
> >should at least give a more sensible message; take another look. I'll
> >recheck myself from the Demon server (I normally test locally) too, next
> >time I connect.
>
> I have just done that test, at about 0030h BST today, Thurs 20th. I got :
>
> Page displayed on Thu 2000-07-20 at civil time 00:29:05.
> The Timezone Offset is -60 minutes.
> The ISO-8601 Week Number is 2000-29 (day 4).
>
> getHours = 0
> getUTCHours = 23
> toString = Thu Jul 20 00:29:05 UTC+0100 2000
> toUTCString = Wed, 19 Jul 2000 23:29:05 UTC
> toGMTString = Wed, 19 Jul 2000 23:29:05 UTC
> toLocaleString = 07/20/2000 00:29:05
>
> document.lastModified: 07/18/00 17:22:20
> Last Modified at Tue 2000-07-18 17:22:20 UTC
Could someone using late versions of Communicator/Navigator
on another unix platforms please try out this page:
http://www.iki.fi/om/lastModified.html
Interestingly enough, while goofing around with this, I noticed that
if I leave out the keyword "new" from the source this seems to work:
var mydate=Date(document.lastModified);
document.write('date: '+mydate);
produces:
date: Thu Jul 20 14:52:22 GMT+0300 (EEST) 2000
What the h*ll is going on here?
Unfortunately, the changes you made to your page do not seem to make a
difference. I get something very similar to this which ever way I
load it, either direct from your site, from a copy on the browser
machine using file:, of from a copy on my regular web server:
--
Page displayed on Thu 2000-07-20 at civil time 14:43:38.
The Timezone Offset is -180 minutes.
The ISO-8601 Week Number is 2000-29 (day 4).
getHours = 14
getUTCHours = 11
toString = Thu Jul 20 14:43:38 GMT+0300 (EEST) 2000
toUTCString = Thu, 20 Jul 2000 11:43:38 GMT
toGMTString = Thu, 20 Jul 2000 11:43:38 GMT
toLocaleString = Thu 20 Jul 2000 02:43:38 PM EEST
document.lastModified: Wed 19 Jul 2000 08:22:20 PM EEST
Last Modified at undefined NaN-0NaN-0NaN 0NaN:0NaN:0NaN UTC
--
/* * * Otto J. Makela <om@iki.fi> * * * * * * * * * * * * * * * */
/* Phone: +358 40 765 5772, FAX: +358 2040 64652, ICBM: 60N 25E */
/* Mail: Mechelininkatu 26 B 27, FIN-00100 Helsinki, FINLAND */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * */
Technical Details
Message-ID:
<m366q1asij.fsf@funland.helsinki.sonera.fi>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<m3vgy3oals.fsf@funland.helsinki.sonera.fi> <LDxOMaAb9Kd5Ew0P@merlyn.demon.co.uk> <m31z0qz0gh.fsf@funland.helsinki.sonera.fi> <IaEea7BMmjd5EwEJ@merlyn.demon.co.uk> <saGX6HCE9jd5Ewgq@merlyn.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f76f2,640a3a91ce97bcb0
X-Google-Attributes: gidf76f2,public
X-Google-Thread: fb3cb,f7635c98973ee01c
X-Google-Attributes: gidfb3cb,public
From: om@iki.fi (Otto J. Makela)
Subject: Re: JavaScript date formatting with Linux Netscape
Date: 2000/07/20
Message-ID: <m366q1asij.fsf@funland.helsinki.sonera.fi>
X-Deja-AN: 648587030
Sender: otto@funland.helsinki.sonera.fi
References: <m3vgy3oals.fsf@funland.helsinki.sonera.fi> <LDxOMaAb9Kd5Ew0P@merlyn.demon.co.uk> <m31z0qz0gh.fsf@funland.helsinki.sonera.fi> <IaEea7BMmjd5EwEJ@merlyn.demon.co.uk> <saGX6HCE9jd5Ewgq@merlyn.demon.co.uk>
Mail-Copies-To: never
Followup-To: comp.lang.javascript
X-Face: 'g'S,X"!c;\pfvl4ljdcm?cDdk<-Z;`x5;YJPI-cs~D%;_<\V3!3GCims?a*;~u$<FYl@"E c?3?_J+Zwn~{$8<iEy}EqIn_08"`oWuqO$#(5y3hGq8}BG#sag{BL)u8(c^Lu;*{8+'Z-k\?k09ILS
X-Trace: read2.inet.fi 964096556 212.213.170.41 (Thu, 20 Jul 2000 15:35:56 EET DST)
Organization: Sonera corp
X-URL: http://www.iki.fi/om/
NNTP-Posting-Date: Thu, 20 Jul 2000 15:35:56 EET DST
Newsgroups: comp.lang.javascript,demon.homepages.authoring