Questions tagged [time]

Time is a dimension in which events can be ordered from the past through the present into the future, and also the measure of durations of events and the intervals between them.

Time is a dimension in which events can be ordered from the past through the present into the future, and also the measure of durations of events and the intervals between them.

It has been said that time is used by the universe to ensure that everything doesn't happen all at once.

It has also been said that: "Time is an illusion, lunchtime doubly so." Not everyone agrees on the nature of time, and time is not fully understood even today.

Because human time perception can be wildly inaccurate, and many system services rely on the close synchronization of clocks, we have specialized clocks do the measurement of time for us. On the Internet, data from these clocks is made available via .

481 questions
361
votes
18 answers

How do I get the current Unix time in milliseconds in Bash?

How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
Richard
  • 3,892
  • 2
  • 18
  • 13
128
votes
14 answers

How do I force sync the time on Windows Workstation or Server?

What is the command to sync a Windows workstation or server to its configured time source?
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
61
votes
7 answers

How to convert 'dmesg' time format to 'real' time format

I have (for example) this log entry in dmesg output: [600711.395348] do_trap: 6 callbacks suppressed Is there a possibility to convert this 'dmesg' time to 'real' time to know, when this event happend?
Jan Marek
  • 2,180
  • 1
  • 13
  • 14
45
votes
3 answers

How to set system time dynamically in a Docker container

Is there any way to set a Docker containers system time dynamically (at run time) without effecting the host machine? Using hwclock --set --date "Sat Aug 17 08:31:24 PDT 2016" gives the following error: hwclock: Cannot access the Hardware Clock…
Vingtoft
  • 1,547
  • 3
  • 15
  • 17
43
votes
4 answers

What time zone is a cron job using?

I'm guessing there's a difference between my PHP time and the server time. When I check the current time in PHP, it's showing that MST is being used. However, cron jobs aren't running at the correct time. How can I check to see what timezone the…
Edward
  • 533
  • 1
  • 4
  • 4
42
votes
4 answers

Windows Server unable to synchronize NTP time reliably

Why does Windows Server (2008, in this case, but I've seen the same problem in 2003) seem to have problem synchronizing time? I've seen this error in my System log across a variety of servers: The time service has not synchronized the system time…
Jeff Atwood
  • 13,104
  • 20
  • 75
  • 92
42
votes
4 answers

Faking the date for a specific shell session

I'm certainly trying to achieve something weird here, but I want to fake the date locally for a shell session on GNU/Linux. I need to black-box test how a program behaves at different dates, and modifying the system-wide date can have unwanted side…
nicoulaj
  • 1,175
  • 2
  • 10
  • 12
34
votes
4 answers

How can I compare an ntp server's time to my server's time?

I have ntpd running on a box. I want to see how the time on the box compares to the time retrieved from ntp.ubuntu.com. Is there an easy way to do this?
John Bachir
  • 2,364
  • 7
  • 29
  • 37
32
votes
1 answer

Why is the year in this ISO timestamp not 2019?

For a simple app I'm using to test a devops pipeline I'm outputting the start time of a build to the homepage. On my development machine the year of the ISO-8601 timestamp I expect, 2019, is printed (specifically, "2019-09-12T20:11:00.000Z"). When…
trycrmr
  • 443
  • 5
  • 8
27
votes
3 answers

Risk of starting NTP on database server?

I've heard rumors of bad things happening to database and mail servers if you change the system time while they are running. However, I'm having a hard time finding any concrete information on actual risks. I have a production Postgres 9.3 server…
26
votes
2 answers

Weird syslog order

Have you ever seen wrong order in /var/log/syslog ? I think that it causes only crontab. Jun 28 22:20:01 alex CRON[2327]: (root) CMD (something > /dev/null) Jun 28 22:21:01 alex CRON[2700]: (root) CMD (something > /dev/null) Jun 21 03:49:01 alex…
Tomasz
  • 371
  • 3
  • 7
26
votes
13 answers

Need leading zero for batch script using %time% variable

I came across a bug in my DOS script that uses date and time data for file naming. The problem was I ended up with a gap because the time variable didn't automatically provide leading zero for hour < 10. So running> echo %time% gives back: '…
Ira
  • 363
  • 1
  • 3
  • 4
24
votes
9 answers

Why is ntpd not updating the time on my server?

I have ntpd running on my server. It's all the default settings, except I commented out its ability to be a server to other machines: # restrict -4 default kod notrap nomodify nopeer noquery …
John Bachir
  • 2,364
  • 7
  • 29
  • 37
23
votes
3 answers

Kill process with high CPU usage after X time?

Running Linux I have a few processes which tend to crash occasionally (game servers), which end up using 100% cpu. I'm looking for a program or script to check the cpu usage of a list of processes by name and if they are at 100% for more than X…
user30153
  • 231
  • 1
  • 2
  • 3
23
votes
10 answers

Compare NTPD and ntpdate

What are the pros and cons between these two ways to synchronize your server? It seems to me that your server would probably not drift more than 1 second every day, so ntpdate on a crontab would be ok. But I heard you could use redundant NTP servers…
Unknown
  • 1,685
  • 6
  • 20
  • 27
1
2 3
32 33