How hard is it to get timestamps right?

How hard is it to get timestamps right?

Author
Discussion

anonymous-user

Original Poster:

54 months

Friday 5th February 2016
quotequote all
[redacted]

LordGrover

33,538 posts

212 months

Friday 5th February 2016
quotequote all
Seems to be syncing errors across servers. Been happening for a week or so.

saaby93

32,038 posts

178 months

Friday 5th February 2016
quotequote all
http://www.pistonheads.com/gassing/topic.asp?h=0&a...

I saw it too a couple days back - I think it was a couple of posts in this forum
The posts have same time stamp but as theyre in minutes the wrong one appears at the front
It's probably getting the wrong order with the hidden seconds

Dom_PH

358 posts

104 months

Friday 5th February 2016
quotequote all
Hi midenginedcoupe,

Thanks for you feedback, I have noted this down to be investigated.

Thanks,
Dom

james_gt3rs

4,816 posts

191 months

Tuesday 9th February 2016
quotequote all
There also appears to be a timing issue with "My Stuff", where if you look at a page which has been updated (say last comment 16:08). You then scroll down the page and read the last post. Then click My Stuff, and the thread is highlighted as if there is a new post you haven't read (at 16:08). But the thread isn't new and clicking on it gives you the same result (last comment 16:08).

RacingPete

8,868 posts

204 months

Wednesday 10th February 2016
quotequote all
The web servers had lost connection with the Internet Time for syncing, and thus were 1 min 12 seconds different causing this issue.

We have reset them to put them back in line.
Will fix the sync issue with Internet Time
Change the underlying code to enter the Posted Time from the database, instead of relying on the web servers, so it is from a single consistent source.


TonyRPH

12,968 posts

168 months

Wednesday 10th February 2016
quotequote all
RacingPete said:
The web servers had lost connection with the Internet Time for syncing, and thus were 1 min 12 seconds different causing this issue.

We have reset them to put them back in line.
Will fix the sync issue with Internet Time
Change the underlying code to enter the Posted Time from the database, instead of relying on the web servers, so it is from a single consistent source.
If you are using virtualisation then simply sync them with the host (the host should always have internet connectivity to talk to NTP servers).

If not using virtualisation, then why not make your DB server an NTP server as well, and use that as a reference?

Assuming it's running on decent hardware, and it has internet connectivity, then it should remain in sync.

If you have more than one reliable server, then set that one up as a secondary NTP server.

You don't need to be stratum 1 (or even 2)

I run one here at home:

root@nas:~# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
+ns1.luns.net.uk 33.117.170.50 2 u 102 1024 377 26.765 0.278 0.156
+lyla.preshweb.c 129.215.42.240 3 u 1042 1024 377 19.888 0.096 0.266
*ntp2.wirehive.n 81.2.117.235 2 u 291 1024 377 20.662 -0.088 0.548
-149.18.85.102.b 131.188.3.221 2 u 425 1024 377 19.712 -1.182 0.435


RacingPete

8,868 posts

204 months

Thursday 11th February 2016
quotequote all
thumbup to all for their help.

This issue is now fixed and the server time is sorted. The code to fix this permanently will be going live in the next month.