Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi Larry,

 

Please advise on how to deal with the UTC time updates (code-wise), that happen every few years. Apparently the 1 second addition to UTC at the beginning of July this year played havoc with some web applications, including some popular social media sites.

 

Regards,

 

Jacques

 

Apache 2.2.21

PHP 5.3.8

MySQL 5.0.8

Link to comment
Share on other sites

Hi HartleySan,

 

Below the link to the article on the 'UTC leap second issue' websites faced at the beginning of July this year I referred to previously.

 

Is there a way of avoiding the UTC leap second issue apart from going the Google route which is most probably out of reach for your avearge web application developer?

 

http://www.dailymail.co.uk/news/article-2167588/Leap-second-2012-Websites-crash-time-hiccup-caused-online-chaos.html

 

Thank you.

Link to comment
Share on other sites

That's fascinating. I just assumed that all hosted PHP servers would be connected to an NTP server that would take all this into account. I didn't realize it was such an issue.

I'm amazed that Google had to go to such lengths to avoid any problems.

 

I suppose a simple, yet inelegant, solution would be to simple take your site down for a minute or so around the leap second, just to insure that no DB insertions/updates occur during that extra second.

My guess is that by the time this becomes an issue again in a couple of years, there will be better solutions available, which will most likely be automatically built into all PHP servers coordinated with an NTP server.

 

Anyway, if Google's best engineers came up with the solution that they did, then I doubt anyone on this forum will be able to come up with a better one short of the software simply being upgraded to take such leap seconds into account.

Link to comment
Share on other sites

I had not heard of this either. I do agree with Hartley here: if that's Google's answer, I doubt we could do better. It sounds to me like it ought to be addressed in the database application, though, and rather than take a sight done at the key second, you could just put up static content and queue all database transactions for the second in question.

Link to comment
Share on other sites

 Share

×
×
  • Create New...