I've been on an airplane (on the flight deck - pre 2001) watching the sun rise in the West. Sometimes local time runs backwards.
So, were you on the Concorde, or was it a Tu-144?
Falsehoods Programmers believe about Time
141–150 of 222 posts
Re: Falsehoods Programmers believe about Time
#14235. Two timezones that differ, will differ by an integer number of hours.
The day before Saturday is always Friday. http://www.nytimes.com/2011/12/30/world/asia/samoa-to-skip-f...
Re: Falsehoods Programmers believe about Time
#143Re: Falsehoods Programmers believe about Time
#144Re: Falsehoods Programmers believe about Time
#145Thread.sleep(1000) sleeps for 1000 milliseconds.
Re: Falsehoods Programmers believe about Time
#146> 1. There are always 24 hours in a day. Can someone explain when this isn't true? Is he referring to leap seconds, or local timezone DST changes? Or something more interesting I'm failing to think of?
Re: Falsehoods Programmers believe about Time
#147https://en.wikipedia.org/wiki/A_Deepness_in_the_Sky#Interste...
Re: Falsehoods Programmers believe about Time
#148Earlier quoted context omitted.
Let's keep some perspective. The vast majority of software applications don't use dates from the 18th century so it's fine to for your app to assume that the Gregorian calendar always was and always will be.
...except that there were countries that weren't using the Gregorian calendar until well into the 20th Century , so you can't even reliably deal with dates as recent as the mid-1900s across borders under that assumption. But don't worry, they're just small countries. Like Russia. And China.
Re: Falsehoods Programmers believe about Time
#149Earlier quoted context omitted.
Let's keep some perspective. The vast majority of software applications don't use dates from the 18th century so it's fine to for your app to assume that the Gregorian calendar always was and always will be.
...except that there were countries that weren't using the Gregorian calendar until well into the 20th Century , so you can't even reliably deal with dates as recent as the mid-1900s across borders under that assumption. But don't worry, they're just small countries. Like Russia. And China.
Re: Falsehoods Programmers believe about Time
#150Some more falsehoods: 1. Time never goes backwards (as other people have pointed out, time zones break this). 2. UTC time never goes backwards (as other people have pointed out, leap seconds break this). 3. The system boot time never changes. On most platforms, the current time is defined as "boot time plus uptime", and setting the current time is performed by changing the boot time. 4. System uptime never goes backw…
> 6. On systems without virtualization, CLOCK_MONOTONIC never goes backwards. On some platforms this can occur due to clock skew between CPUs.
Could you explain these situations in more detail? Or cite a source I can take a look at?
CLOCK_MONOTONIC is what I use for timing quite often. I tend to do soft real time stuff and that clock seems the best suited for my tasks.