Skip to main content
67 votes
Accepted

Why is the year in this ISO timestamp not 2019?

Most of the google hits show CODEBUILD_START_TIME being represented as the number of milliseconds since 1970. I suspect somewhere in your code you are treating that as if it were seconds. If you ...
Zoredache's user avatar
  • 132k
39 votes
Accepted

What time zone is a cron job using?

Cron job uses the server's define timezone (UTC by default) which you can check by typing the date command in terminal. All countries timezones are defined in /usr/share/zoneinfo directory: cd /usr/...
imvikasmunjal's user avatar
34 votes
Accepted

How to set system time dynamically in a Docker container

It is possible The solution is to fake it in the container. This lib intercepts all system call programs use to retrieve the current time and date. The implementation is easy. Add functionality to ...
Vingtoft's user avatar
  • 1,597
12 votes

dmesg time vs system time time isn't correct

Workaround is journalctl with -k, --dmesg. I am using -k as it is shorter: journalctl -k It will show only kernel messages and correct time. To show only kernel lines matching phrase: journalctl -kg ...
16851556's user avatar
  • 526
12 votes

Sync ntp immediately at boot with undiciplined clock

You can use the -g parameter. From the manpage: -g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the ...
basekat's user avatar
  • 456
11 votes

What time zone is a cron job using?

If you have may users, with many crontabs and they have different time zone requirements, you cannot just change system timezone. But you still can set a specific time zone to be used just for the ...
NDonelli's user avatar
  • 127
10 votes

dmesg time vs system time time isn't correct

To get accurate times for "recent" entries in dmesg, you could convert the dmesg timestamps to real time with some hacking of the output. By "recent", I mean times after the last ...
mivk's user avatar
  • 4,572
8 votes

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

change your time server w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org" /syncfromflags:manual /update fore update time w32tm /resync /force
user5723841's user avatar
8 votes

What time zone is a cron job using?

While the accepted answer is correct, I would like to add a correction to the verification. The accepted answer says you can verify the system time by typing date in the terminal. When I type date, it ...
Kyle W's user avatar
  • 81
8 votes

Docker - Timezones in containers not same as on host

You should be able to set timezone in your containers by using tzdata : docker run -e TZ=Europe/Amsterdam debian:jessie date Credits and further explanation to "Why containers don't sync time with ...
Alexandre Roux's user avatar
7 votes

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

Powershell one liner if ntp server is configured: gsv w32time | sasv; w32tm /resync /force You can put this .bat file in the startup if you CMOS batery failed so it can resync upon OS start: @...
majkinetor's user avatar
7 votes

What time zone is a cron job using?

Unless you know a priori what time zone cron is running in, the only reliable solution is to check empirically. Otherwise, you might just be checking the time zone of your current shell environment, ...
ruief's user avatar
  • 333
6 votes

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

I know this is now old but dmesg now has a built in -e or --reatime option to display the time in the local time. root@bbs:/var/log# dmesg|tail -1 [50755952.379177] Out of memory in UB 1593: OOM ...
nelgin's user avatar
  • 89
6 votes

Turn OFF NTPD immediatly synchronization

By default, ntpd will step (instead of slew) the time if the offset is greater than 128ms. You can avoid that with the -x command line option, but beware: Correcting one second of offset will take ...
Sven's user avatar
  • 99.7k
6 votes

What is the minimum annual overhead required to admin an On-Premises Exchange Server

A data point. I manage about 24 Exchange servers for customers now, and spend about 2 hours per month on mail-related issues which may include SSL certificates, user management, managing the ...
ewwhite's user avatar
  • 199k
6 votes

Incorrect Ubuntu server time

How to keep accurate time on Ubuntu continuously? By enabling the ntpd service and running it continuously. I synchronized it using sudo ntpdate -s time.nist.gov few months ago but it jumped ...
HBruijn's user avatar
  • 80.8k
6 votes

Incorrect Ubuntu server time

Unfortunately Ubuntu hasn't added the disclaimer from NTP.org's ntp-4.2.*\html\ntpdate.html manual to Ubuntu's ntpdate(8) manpage, like for example FreeBSD has: ntpdate - set the date and time via ...
Esa Jokinen's user avatar
  • 50.2k
6 votes
Accepted

Why is my internal clock always 1.3 seconds off?

Turns out w32time simply sucks. Microsoft admitted that w32time cannot reliably maintain sync time to the range of 1 to 2 seconds. Great software guys... I installed a different implementation ...
Grunzwanzling's user avatar
6 votes
Accepted

Redhat Enterprise Linux 7: How to disable DST - Daylight Saving Time

You don't disable DST per se, you set the desired time zone, and you get DST if the time zone has DST. You can check the configured time zone with timedatectl. If your timezone has DST you'll see ...
Michael Hampton's user avatar
6 votes

Sync ntp immediately at boot with undiciplined clock

In addition to the -g flag described above, you should add iburst to the server line on the clients. This will cause them to sync more quickly to the server. However, you can't expect your server ...
Paul Gear's user avatar
  • 4,602
5 votes

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

Another solution for MacOS: GNU Coreutils I have noticed that the MacOS' version of the date command is not interpreting the %N format sequence as nanoseconds but simply prints N to the output when I ...
David Ferenczy Rogožan's user avatar
5 votes

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

OS: MS Windows 7 All above ideas have been tried but did not help. The original problem still exists: "The computer did not resync because the required time change was too big." Solution is found in ...
Akos's user avatar
  • 61
5 votes

Is PTP really more precise than NTP? If so, why?

Yes, it seems possible in principle that NTP can approach PTP. Although, if the requirement is simply sub-second accuracy, NTP can do that over nearly any network. NTP can be very precise, the ...
John Mahowald's user avatar
5 votes

System time is off by up to hundreds of milliseconds despite NTP sync before boot

I do not have numbers to produce, but it seems probable that the interface used to set the clock at boot only has precision down to the second. You do not state your OS, but on all Unix-like systems ...
Law29's user avatar
  • 3,577
5 votes
Accepted

Windows Server 2022 Time Service Jumping into the future

UPDATE: Ars Technica has written an article on this problematic feature: https://arstechnica.com/security/2023/08/windows-feature-that-resets-system-clocks-based-on-random-data-is-wreaking-havoc/ TL;...
simendsjo's user avatar
  • 354
4 votes

Why is ntpd not updating the time on my server?

If ntpd wouldn't be able to connect with the remote server, you wouldn't see an offset for that server. If ntpq would be blocked by ntpd, you would see a clear error message from ntpq. If some other ...
Robert's user avatar
  • 41
4 votes
Accepted

Incorrect Ubuntu server time

Install ntp package sudo apt-get install ntp Edit /etc/ntp.conf for your neighbor ntp server sudo vi +/^server /etc/ntp.conf Reload ntp configuration sudo service ntp reload Check time sync status ...
minish's user avatar
  • 656
4 votes

How much clock asynchronicity can secure protocols tolerate?

I've heard 5 minutes thrown around several times as per EEAA's comment, but I honestly don't know why (and am looking forward to an explanation). Bear in mind this is not the TLS protocol itself that ...
G42's user avatar
  • 206
4 votes

Centos Linux stuck in time

Your peers might be reachable by ping, but they aren't reachable by NTP, which is the important thing for clock sync. You may have a local, network, or ISP-level firewall blocking access. However, ...
Paul Gear's user avatar
  • 4,602
3 votes

How to make Jenkins CI use Local time instead of UTC on debian squeeze

If this relates to the execution of jobs based on a cron schedule (ie Build Periodically), you can set you Time Zone in the cron schedule on a per job basis: TZ=Europe/Dublin 0 7 * * 1-5
Garreth McDaid's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible