Hacker News new | ask | show | jobs
by nn2 5142 days ago
AV Rule 25 (MISRA Rule 127) The time handling functions of library <time.h> shall not be used.

Yes everyone reinventing their own broken flat tire date routines is the way go. If they used the same silly rule on the F22 that explains http://blog.utest.com/international-date-line-bug-caused-fig...

Time related code is really hard to write.

2 comments

It says this in the article:

The problem arose not from the time change, but from the change in longitude

I don't think you can blame the time handling for that one! Although you are right in the broader sense that is really difficult to write code that handles times and dates correctly, and you generally shouldn't write you're own. I'd imagine the guys writing this stuff are pretty good though and can probably handle it.

You mean nobody told you about the time.h backdoor? It's a classic.