bubbasheeko Posted November 2, 2009 Share Posted November 2, 2009 I am developing a time card app, but have run into an issue that I didn't think of when I started the project. I want to display a digital clock on the screen that auto increments. So this would be Javascript. However, the problem I didn't think of at the time I came up with the idea was where the Javascript would get the time. Javascript defaults to the time of the user's computer. Obviously for a timecard app I would not want the user changing the time on their computer to look like they were in on time. So, I then thought of just using their main computer to pull the time, but this system is accessible by each of the employees. Then it hit me. I could pull the time from a NTP server. Now, I know how to pull the time from the NTP server with PHP. What I don't know is how I can get Javascript to grab that time and start incrementing it so that it can be used when the 'punch' form is submitted. I already have a plan if the time can not be grabbed from the NTP server. If anybody could get me started or point me in the right direction that would be great! Link to comment https://forums.phpfreaks.com/topic/179890-javascript-clock-with-time-based-on-ntp-server-that-is-pulled-using-php/ Share on other sites More sharing options...
bubbasheeko Posted November 2, 2009 Author Share Posted November 2, 2009 To clarify this a bit more. The Javascript will keep the clock up to date, but I need to use a NTP server to start it off. I am not aware of how to do this in Javascript, or if it could be provided by a script I already have in PHP. Link to comment https://forums.phpfreaks.com/topic/179890-javascript-clock-with-time-based-on-ntp-server-that-is-pulled-using-php/#findComment-949036 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.