One very common configuration step on a new instance is setting the time zone. This time we'll explicitly set the EDT (New York) time zone for our server (even if the server is running in Europe or somewhere else). It is sometimes important to have as early as possible a correct date and time set up (for things like registration times, delays, and other issues depending on dates and times).
To set the server's time zone automatically to America/New_York
, use the timezone
directive:
#cloud-config timezone: "America/New_York"
That is it! Our server is now configured from the beginning to use the correct time zone:
$ date Sun Sep 25 10:48:32 EDT 2016
This, in fact, has simply set the /etc/timezone
file to the correct value:
$ cat /etc/timezone America/New_York
3.147.77.250