Closed
Bug 7593
Opened 26 years ago
Closed 25 years ago
JavaScript new Date objects off by +10 seconds
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: KerryGinn, Assigned: mike+mozilla)
Details
Dates are displayed 10 seconds ahead of the system clock:
<SCRIPT LANGUAGE="JavaScript">
setInterval("top.status=(new Date()).toLocaleString()", 1000);
</SCRIPT>
Updated•26 years ago
|
Assignee: norris → mccabe
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•26 years ago
|
||
Mmm. Date. At least it's not y2k. Its d10s.
Setting status to assigned.
updating QA contact and moving to the "JavaScript Engine" component.
| Assignee | ||
Updated•26 years ago
|
Whiteboard: Y2k
| Assignee | ||
Comment 4•26 years ago
|
||
Removing y2k from the status whiteboard. I don't think being ten seconds off
qualifies.
I do not see this problem in Gecko Milestone 7 for Mac PPC. -- Kerry Ginn
| Assignee | ||
Comment 6•26 years ago
|
||
Kerry -
Thanks for checking this. Do you think it's safe to mark closed?
I have been seeing (slightly undesirable?) behavior based upon the inherited
design of the Mac Mozilla browsers; it is probably well-known. I wish to leave
it up to the current Mac designers if they want to improve the design or not.
Apparently, a value which translates the Mac's low memory global tick count to
time is fetched during browser initialization. Thereafter, the browser will not
recognize changes to the system clock. I guess that there must be a ten second
synchronization discrepancy when programs are started which I was seeing.
I am strongly in favor of efficient execution and I'm sure that the current
Mozilla design is an efficient one; however, I wonder how well the current
Mozilla design keeps track of the current time if the browser is running when
daylight savings time begins and ends?
| Assignee | ||
Comment 8•26 years ago
|
||
Kerry -
First, you should know that JavaScript has its own date and time initialization
code, separate from other date code in the browser. If any date code has the
problem you observe, and a fix is found, it'll probably need to go in several
places. (there's a small amount of redundant code between the browser and the
javascript engine, but it lets us maintain the engine separately, which we've
found to be a good thing.)
If you're interested in taking a look at the behavior of locking down the system
time, the relevant file is js/src/prmjtime.c, which provides the
platform-specific time-handling primitives used by js/src/jsdate.c, which is all
cross-platform code. A relevant function (from my quick examination) is
MacintoshInitializeTime.
You should know that although this bug is currently assigned to me, it's not too
likely that I'm going to do any work on it. I'm not really a macintosh person,
and the code works well enough now that I'd rather not touch it. It seems
likely that other Macintosh programs have solved the same problem in better
ways. If you can cast any light on it (and provide a patch) please feel free.
Also cc'ing Wan-Teh in case anything has changed in the analogous NSPR code.
Setting all Javacript bugs to rginda QA Contact.
QA Contact: cbegle → rginda
| Assignee | ||
Comment 10•25 years ago
|
||
[SPAM] Marking milestone 'future' as part of nsbeta3 triage.
Target Milestone: --- → Future
| Reporter | ||
Comment 11•25 years ago
|
||
Isuggest closing/combining this bug to Bug#34724, which is getting more
attention and probably has a correct explination in the comment from
beard@netscape.com 2000-06-16 14:23
| Assignee | ||
Comment 12•25 years ago
|
||
I don't see any connection between the two bugs.... however, I'd love to close
this one. Are you still seeing the problem?
| Reporter | ||
Comment 13•25 years ago
|
||
Reccommend close. My test script performed accurrately in M17, NN6b2, and a
recent M18 nightly, using MacOS 8.6 on my G3/266.
| Assignee | ||
Comment 14•25 years ago
|
||
Closing this bug. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•