Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's actually interesting if you dig into the discussion is that the actual behavior depends on your timezone.

Basically from UTC east to the IDL, it behaves as you describe it. Anything west, it evaluates to true as long as it is set and there is a timezone offset. This is because once you are at a negative offset, you subtract and get a higher number so it will never evaluate to false with a negative offset.

Basically this current behavior is useless for anything I can imagine. You can't use it to check for midnight UTC. You can't use it to check for whether it is set. You can probably use to check for midnight with no timezone but add a timezone and now your handling is messy.

This is why contracts need to be sanely written from a code contract point ahead of time. This was apparently a developer describing how his code worked and later calling it a contract, which is a very bad thing :-D



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: