mercredi 14 janvier 2015

Get current timezone on Centos 7


On previous version of centos , i used the following command to get the current timezone in my bash script



timezone=$(sed 's/ZONE=//g' /etc/sysconfig/clock)


Output is "America/New_York"


How can i achieve an exact output on centos 7



Aucun commentaire:

Enregistrer un commentaire