Or ditch the seconds and.

Touchton: Iateadonut so go with something like this, but now there’s another question – why are you suggesting an email i’ve already entered?

Hudkins: It’s adding an email to ’emailTo’ – my hope was to have it be more fluid so you wouldn’t have to click an ‘add’ button.

Stuckey: But i guess i’ll just do that.

Hengel: Have what be more fluid?

Wischner: I don’t understand what your end goal is.

Hinnant: Entering multiple email addresses.

Doyer: Robertmaxrees: gimme me some donut too!

Ghazi: Hello everybody, I’ve a problem, I have a clock made with javascript, it only shows the current time, that part is easy, but it should show the server time, my problem is when the client has a different time, only seconds, it will fail, somebody knows a good way to sync the time against the server time ?

Gassel: Iateadonut you really want something more like a tagging setup.

Fitchpatrick: Germanaz0 populate a variable in the page with the server time on load and display that, updating it every second.

Townes: Germanaz0 or publish the UTC offset and use something like moment.js and go that route

Grage: To use moment, is a smart idea

Bracher: The thing to publish the time and increase every second, is that the clock is not well accurated using setInterval

Hererra: SetInterval lose some miliseconds sync

Barick: Robertmaxrees, what would be a good keyword to google to learn about a ‘tagging setup’?

Menjivar: Germanaz0 what are you actually trying to build?

Panak: Showing my server time

Lanzarin: The problem is that when I have for example, 00:00:00 and the client has 00:03:05

Alnutt: Is not showing well the minut and seconds

Kaucher: Germanaz0 that’s why you use moment and poll the client for its current time, then display that time.

Thomeczek: Well that example is not good, is when I have 00:00:00 and the client 03:05:45

Montoure: Doing the time difference, shows 00:05:45

Eiben: Germanaz0 doens’t change my point. if you really need the client and the server to be identical, don’t update client-side at all.

Rayne: Refresh the page or use ajax/sockets to update on a fixed interval.

Klitsch: Iateadonut search for something like “jquery tagging”

Crago: Girdler: but the fixed interval is still wrong

Mcinally: Germanaz0 that’s why you ask the server on the interval.

Newey: I could not fix the difference

Ade: I will show you a code

Aveles: Germanaz0 which is why you ask the server for its time and offset to the client-side time.

Donalson: Like, you have to pick one or the other.

Pulse: The client and server will never agree on the current time.

Holt: So if you need things to “sync”, you need to use one and offset to get the other.

Purtell: If you care more about the server time, ask it and then offset for the client. but the two will never match.

Welde: Would you mind to show me an example ?

Wohlfahrt: I will show you what I’ve first

Shiers: I’m not going to write anything for you – i’m telling you that the client and server clocks will never be accurate against one another.

Bente: Ok, so I should use server clock to get offset

Mullan: I wouldn’t even display the client side time to the user.

Davidowicz: They have a clock on their screen already.

Leidich: But my clock need to tick

Kong: It’s going to be imprecise then.

Carrow: And how to update that clock always ?

Greenham: If I’m using the server time

Lundeby: You’ll need to use something like socket.io

Manivong: Or ditch the seconds and reload the widget/refresh the data every x minutes.