Skip to main content

Posts

Showing posts from May, 2019

Falsehoods programmers believe about time

Disclaimer: This is not my own collection! I learnt a lot from different blog post about this 'famous' topic. Here is the list of some of the misconceptions and mistakes related to both calendar and system time: All of these assumptions are wrong There are always 24 hours in a day. Months have either 30 or 31 days. Years have 365 days. February is always 28 days long. Any 24-hour period will always begin and end in the same day (or week, or month). A week always begins and ends in the same month. A week (or a month) always begins and ends in the same year. The machine that a program runs on will always be in the GMT time zone. Ok, that’s not true. But at least the time zone in which a program has to run will never change. Well, surely there will never be a change to the time zone in which a program hast to run in production. The system clock will always be set to the correct local time. The system clock will always be set to a time that is not wildly differe