I was in the process of getting the time zone details from the some of the machine in the infrastructure.
And some machines have timedatectl
and getting the required details seems to be quite easy from this.
$/etc/bin/timedatectl | /bin/grep "Timezone"
Timezone: America/Los_Angeles (PST, -8000)
But I was looking for alternative was to get the time zone details in the machines which does not have timedatectl
command in them.
And ended up checking the /etc/locatime file and since this is a binary file. Hence finding some hard time in getting the required details.
/usr
as a separate filesystem, then/etc/localtime
probably won't be a symlink but an actual copy of the appropriate timezone file from/usr/share/zoneinfo
, as it should be available also during early boot when/usr
might not be mounted yet. – telcoM Feb 14 '18 at 21:02/usr
on a separate partition. Thanks for adding that tidbit. :) – Mio Rin Feb 14 '18 at 21:07