Solved

JavaScript: Time Local Accuracy Alt.

Posted on 1997-11-08
6
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Fix Form size HTML 16 31
How to change the colour of columns using dynamic data for google charts 3 49
ASP sending two datas 2 23
Getting selected value using Jquery 3 21
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

733 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