Questions tagged [ntp]

Network Time Protocol is an application level network protocol that is used for synchronizing clocks of computer systems. The term also refers to the reference software implementation.

The Network Time Protocol version 4 is defined in RFC 5905, RFC 5906, RFC 5907, and RFC 5908. NTPv4 is also suitable for the Internet Protocol version 6 address family.

The reference software implementation is provided by the NTP Public Services Project.

http://en.wikipedia.org/wiki/Network_Time_Protocol

693 questions
131
votes
22 answers

How to make sure docker's time syncs with that of the host?

I have dockers running on Linode servers. At times, I see that the time is not right on the dockers. Currently I have changed the run script in every docker to include the following lines of code. yum install -y ntp service ntpd stop ntpdate…
Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96
117
votes
7 answers

Will a docker container auto sync time with its host machine?

Do I need a NTP server inside a docker container to periodically sync the time or will the container re-sync time with its host machine? The docker container time zone is correctly set.
vantt
  • 1,271
  • 2
  • 9
  • 4
116
votes
6 answers

How to Query an NTP Server using C#?

All I need is a way to query an NTP Server using C# to get the Date Time of the NTP Server returned as either a string or as a DateTime. How is this possible in its simplest form?
JL.
  • 78,954
  • 126
  • 311
  • 459
68
votes
5 answers

Is Android using NTP to sync time?

Do Android Devices use the network time protocol (NTP) to synchronize the time? In my Device-Settings I see a checkbox with the following text "synchronize with network", but I don't know if they are using NTP. I need this for my Bachelor Thesis for…
iTamp
  • 793
  • 1
  • 8
  • 12
48
votes
6 answers

Getting current GMT time

Is there a method in C# that returns the UTC (GMT) time zone? Not based on the system's time. Basically I want to get the correct UTC time even if my system time is not right.
user62958
  • 4,669
  • 5
  • 32
  • 35
43
votes
4 answers

How Does the Network Time Protocol Work?

The Wikipedia entry doesn't give details and the RFC is way too dense. Does anyone around here know, in a very general way, how NTP works? I'm looking for an overview that explains how Marzullo's algorithm (or a modification of it) is employed to…
Waylon Flinn
  • 19,969
  • 15
  • 70
  • 72
39
votes
4 answers

How to resynchronize with chrony?

I am looking for an equivalent of 'ntpdate IPaddress' command in the chrony suite to force chronyd to synchronize time right now.
Nfernandez
  • 646
  • 1
  • 5
  • 16
36
votes
4 answers

how to sync windows time from a ntp time server in command

I am working on windows 7. I can sync time of win7 from a ntp linux server manually. How can I do that in command prompt. So I can run it on windows startup. And windows task plan not work for me. The time should be like this: Linux server --> …
Nick Dong
  • 3,638
  • 8
  • 47
  • 84
33
votes
6 answers

System.currentTimeMillis() returns incorrect timestamp on Huawei

The issue is that System.currentTimeMillis() returns the wrong milliseconds with different ranges of time mainly within the future sometimes up to 6 months, but it varies from a few seconds to months. The device that this is occurring on is a Tablet…
Arlind Hajredinaj
  • 8,380
  • 3
  • 30
  • 45
30
votes
3 answers

GPS: How NTP time injection works

I've recently known about a gps.conf file in the /system/etc/ directory. Seems that tweaking NTP_SERVER values to NTP servers nearer to the usual location improves TTFF. Reading the source code in the LocationProvider class, seems that at boot, time…
Mister Smith
  • 27,417
  • 21
  • 110
  • 193
27
votes
7 answers

Network Time Protocol for iPhone

I am writing an application that requires accurate timing. After asking this question, I have decided to investigate using NTP or maybe Simple NTP. Is there any open source implementation of these protocols for the iPhone? So far I have managed to…
Casebash
  • 114,675
  • 90
  • 247
  • 350
22
votes
5 answers

Java NTP client

I need my software to communicate with an NTP server to determine the local clock offset. I have tried using the org.apache.commons.net.ntp package, but its implementation is rather poor when running on Windows, because of the use of…
Matt Howells
  • 40,310
  • 20
  • 83
  • 102
21
votes
3 answers

Is there an NTP server I should be using when using Amazon's EC2 service to combat clock drift?

I’m using AWS and am on an EC2 server … [dalvarado@mymachine ~]$ uname -a Linux mydomain.org 3.14.33-26.47.amzn1.x86_64 #1 SMP Wed Feb 11 22:39:25 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux My clock is off by a minute ro so despite the fact that I…
Dave A
  • 2,780
  • 9
  • 41
  • 60
19
votes
2 answers

Ubuntu timedatectl fails in Docker container

I've got Ubuntu 16.04 LTS running in a Docker container (hosted on macOS). The date/time is off by about four days. $ cat /etc/*-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS" $…
Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
18
votes
2 answers

Java scheduler which is completely independent of system time changes

Was using Java Timer, Then switched to ScheduledExecutorService, but my problem is not fixed. As Tasks scheduled before system time change (through ntpd) are not executed on delay specified. Have no logs for same as nothing happens :(. using jre…
YoK
  • 14,329
  • 4
  • 49
  • 67
1
2 3
46 47