Solved

JavaScript: Time Local Accuracy Alt.

Posted on 1997-11-08
6
165 Views
Last Modified: 2006-11-17
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
Comment
Question by:HotApp1ePi
  • 3
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
Holger101497 earned 220 total points
ID: 1273086
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
 

Author Comment

by:HotApp1ePi
ID: 1273087
Okay Holger, I will hold off accepting either answer until you have posted to both questions.
0
 

Author Comment

by:HotApp1ePi
ID: 1273088
Hello?  Anyone home?
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 6

Expert Comment

by:Holger101497
ID: 1273089
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
 
LVL 6

Expert Comment

by:Holger101497
ID: 1273090
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
 

Author Comment

by:HotApp1ePi
ID: 1273091
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now