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 ...
58
votes
How do I force sync the time on Windows Workstation or Server?
For those that still asking this question.
To update, use the command below (2008 and 2012 server compatible)
w32tm /config /manualpeerlist:"ntp_server" /syncfromflags:manual /reliable:yes /update
...
36
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/...
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 ...
18
votes
dmesg time vs system time time isn't correct
dmesg just prints the kernel ringbuffer which logs messages with uptime in seconds from being started as timestamp.
So if you use the -T option all this uptime values are just added to the date your ...
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 ...
11
votes
How to make Jenkins CI use Local time instead of UTC on debian squeeze
Three years later, I found several gotchas getting this to work. So, I'll elaborate upon the accepted answer (which is correct) and add a complete answer for CentOS.
Gotcha #1: The Jenkins settings ...
10
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 ...
9
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 ...
9
votes
Accepted
MySQL logs different time than NOW()
Solution was super simple: look through the variables and try to locate relevant:
log_timestamps | UTC
So I changed it to 'SYSTEM':
mysql> SET GLOBAL log_timestamps = 'SYSTEM'...
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 ...
7
votes
How to make Jenkins CI use Local time instead of UTC on debian squeeze
In Ubuntu 14.04, none of the above solutions worked for me, but I ended up running the following command, which pulls up an interface where the timezone can be changed from the default (none selected) ...
6
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
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 ...
6
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 ...
6
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
5
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:
@...
5
votes
Accepted
Does NT5DS time synchronization have any place in a mixed Windows / Linux environment?
NT5DS Is the client protocol for Windows systems to retrieve time from a DC. Using this on your Windows machines does not prevent you from also enabling the NTP server on your Windows DCs, and ...
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 ...
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 ...
5
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 ...
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
...
4
votes
Accepted
How to speed up (very remote) overloaded server connection
No, it's unlikely that the distance from France to Canada is making any significant difference, or that getting a Canadian VPN would help. If the server is overloaded, then there's nothing that you ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
time × 480ntp × 120
linux × 103
windows × 67
time-synchronization × 62
timezone × 43
date × 36
ubuntu × 29
ntpd × 24
centos × 21
windows-server-2008 × 20
cron × 19
windows-server-2003 × 17
clock-synchronization × 16
active-directory × 15
unix × 15
debian × 14
bash × 13
mysql × 12
domain-controller × 12
windows-server-2012 × 11
synchronization × 11
amazon-ec2 × 10
hyper-v × 9
scripting × 9