You don't know jack about dates & times

Time is an illusion

(lunch-time doubly so)

There are always 24 hours in a day

An hour is 60 minutes long

A minute is 60 seconds long

Months have either 30 or 31 days

February has 28 days

Years are 365 days long

Every 4th year is a leap year

The first week of a year is in January

The client clock will be in-sync with the server

Timestamps make good IDs

Timestamps increase monotonically

The offsets between two time zones will remain constant

1+1=2

or: each minute/hour only happens once

Daylight saving time always adjusts by 1 hour

or: there are only 24 timezones

Daylight saving time switches 0 or 2 times a year

Thread.Sleep(1000) sleeps for 1000ms

see also: setTimeout

DateTimes are in UTC

DateTimes are in UTC or local time

Dates are in UTC/local time

UTC offsets are equivalent to time zones

Now you know what to look out for

You don't know jack about dates & times

By soxtoby

You don't know jack about dates & times

  • 17