[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

JavaScript: Time Local Accuracy Alt.

I previously asked a question regarding obtaining the "accurate" time for a specific locality to insure against local user error and idiosyncracy as well as known browser and JavaScript bugs.

I was convinced that there was no answer to my question and I accepted a very good, and adjustable, "Java" applet answer.  I am now convinced that, up to a certain point, it "is" possible to obtain the accurate local time on "most" (if not all) user's systems and browsers.  Since so much work was put into that previous question I would like to still award 200 points for a "specifically" JavaScript answer with fully commented code, with separate frame and form versions, with the "option" of using an additional CGI script should I be able to load that onto my server (sysadmin permission has been requested).

Thanks in advance!
0
HotApp1ePi
Asked:
HotApp1ePi
  • 3
  • 3
1 Solution
 
Holger101497Commented:
well, since I know that this one's for me (after all, 95% of the solution is posted in the other thread (quite an impressive thread - 64 KB by now!) and on the web), I take the liberty to lock this one although I can't post the (fully commented) answer before tomorrow.

I also discovered yet another inconsistency, this time affecting IE/NN. The date.getTimezoneOffset() functions in the two browsers have opposite signs! Much to my regret, I have to admit that IE has the more "accurate" implementation in this case.
Netscape returns 300 minutes for GMT-5 while IE returns -300!! I'll also get that fixed before I post my solution...

Since this one is just for "double grading" / splitting points, I recommend not looking at this answer in the PAQ's - the question
JavaScript:Time Local Accuracy http://www.experts-exchange.com/topics/bin/ShowQ?qid=8630023068 contains the more complete discussion of the topic. If HotApplePi waits a little longer before he accepts the Applet-solution for that one, I will also post my solution there (I won't "pay" to get access to it, though!)
0
 
HotApp1ePiAuthor Commented:
Okay Holger, I will hold off accepting either answer until you have posted to both questions.
0
 
HotApp1ePiAuthor Commented:
Hello?  Anyone home?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Holger101497Commented:
yes, kind of :-) sorry for being a little slow, but for one thing, I don't have quite as much time during the week as I have on weekends and I also got a flu, a headache and spent at least half of the last 24 hours sleeping...

I'm working on it right now and I might try to post an answer before going to bed now (it's after midnight already), but definitely within the next 16 hours....

C U soon...
0
 
Holger101497Commented:
puhh.... there we go! The complete page to look at is now posted at http://home1.gte.net/stratmhx/experts/time/frames/index.html.
It is tested in IE3 and NN3&4 and hopefully works fine. I made some adjustments that significantly compacted the code. The longer and commented versions are still on the page, but since both clocks are on the page with frames, I have not updated the simple clock on the other page...

Let me know if you like it or if you need (even) more comments, so I can post it here... btw: I saw that you accepted the other answer which made me realize that holding it back was kind of stupid anyway: You can simply copy the code I will post here and add it to the other thread - I won't pay 25 points to get there ;-)

Glad to see that you found a way of getting additional points without a credit card *ggg* - I just wanted to give you additional time to accumulate more points for this question ;-)

Enjoy the clock! There is a "hacker-version" that does everything in 2 lines!
0
 
HotApp1ePiAuthor Commented:
Please post the commented code to this discussion "without" using my page as an example.  I am not paying to go searching for the code.  :o)  I need to see a "simple" demonstration with minimal frames and without italics and without spaces on either side of the colon (it looks like there is a full space on both sides of the colon).  The "hacker" version may be helpful as well.

I have added 15 more points for your additional effort.  :o)

Thanks.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now