<p>Say I have some (.NET Core) code running in a k8s pod and I ask for:</p>

<pre><code>DateTime.Now
</code></pre>

<p>I assume I will get the date-time from the host that the pod is running on. Is there any way of getting a date-time value that is consistent across the k8s cluster?</p>

<p>The clock in a container is the same as the host machine because it’s controlled by the kernel. </p>

<p>The timezone is controlled by the OS layer tho and so may be different in the container. You can mount in the time zone file to overcome this.</p>

<p>Synchronization of clocks across machines is a complicated topic. You can go as simple as installing an NTP client on all the nodes or as complex as installing GPS hardware clocks on every node. </p>

<p>If your Kubernetes nodes are VMs this adds another layer of complexity. Most IaaS and hypervisors provide some way of synchronizing the VM clock with the host, but you still need to keep all your host machines in sync. </p>
