New answers tagged

0

@Shen Unix isn't born in 1970. The Unix epoch is midnight on January 1, 1970. It's important to remember that this isn't Unix's "birthday" -- rough versions of the operating system were around in the 1960s. Instead, the date was programmed into the system sometime in the early '70s only because it was convenient to do so, according to Dennis Ritchie, one ...


1

I recommend you read this article from RedHat. Hardware Clock, is a clock that runs independently of any control program running in the CPU and even when the machine is powered off so it can keep track of the current time. And hwclock is a utility for accessing the Hardware Clock - also referred to as the Real Time Clock (RTC) or CMOS clock. You can ...


0

The hardware clock is the real-time clock (these days part of the southbridge chip) the same subsystem also stores BIOS settings, and the hardware clock can often be set via the BIOS settings menus. On linux the hwclock tool can be used to access the hardware clock from the command-line. Using UTC for the hardware clock give more consistent results on ...


0

One way to determine the local time zone is to run the following script: tzselect After answering a few questions about the location, the script will output the name of the time zone (e.g., Asia/Bangkok). Then create the /etc/localtime file by running: sudo ln -sT /usr/share/zoneinfo/<xyz> /etc/localtime Replace with the name of the time zone ...


0

UNIX time is measured on your computer, running UNIX. This answer is going to expect you to know what Coördinated Universal Time (UTC), International Atomic Time (TAI), and the SI second are. Explaining them is well beyond the scope of Unix and Linux Stack Exchange. This is not the Physics or Astronomy Stack Exchanges. The hardware Your computer ...


25

Your headline question doesn't have a real answer; Unix time isn't a real timescale, and isn't "measured" anywhere. It's a representation of UTC, albeit a poor one because there are moments in UTC that it can't represent. Unix time insists on there being 86,400 seconds in every day, but UTC deviates from that due to leap seconds. As to your broader question,...


11

The adjustments to the clock are co-ordinated by the IERS. They schedule the insertion of a leap second into the time stream as required. From The NTP Timescale and Leap Seconds The International Earth Rotation Service (IERS) at the Paris Observatory uses astronomical observations provided by USNO and other observatories to determine the UT1 (navigator'...


0

That happens in zsh: $ zsh -c 'time sleep $(sleep 3; echo 1)' sleep $(sleep 3; echo 1) 0,00s user 0,00s system 0% cpu 1,001 total But not in bash (or ksh): $ bash -c 'time sleep $(sleep 3; echo 1)' real 0m4.003s user 0m0.000s sys 0m0.000s One simple solution will be to use some from of grouping: $ zsh -c 'time ( sleep $(sleep 3; echo 1); )...


3

The answer was simpler than I thought it would be. Credit to John B, one can use a sub-shell (...) for this: ➜ time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total



Top 50 recent answers are included