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 .

486 questions
389
votes
20 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
  • 4,172
136
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
  • 85,693
66
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,230
47
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
  • 573
46
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,647
  • 3
  • 16
  • 17
44
votes
5 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,245
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,264
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,394
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
27
votes
3 answers

DHCP Options for Network Time Server

It looks like there are two options for providing network time settings to a DHCP client; option 004 and option 042. The description for 004 is "Time Server", while 042 specifies NTP. Is there a reason to use one or the other, or is it just vendor…
TimM
  • 373
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
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
25
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,394
24
votes
4 answers

dmesg time vs system time time isn't correct

I hope that here is somebody that can help me with this strange problem. I think that i know why it is happening but i don't know how to solve it. Maybe it is because the BIOS time isn't set correct or something like it. But i don't want to change…
g00gle
  • 383
1
2 3
32 33