How do i work out the world time on linux?
-
Note: This command exists on later version of linux. The command does not change the time or date, it only shows you the setting you need.
There are tons of webinars these days and some of them do not give you the time for your area.
There are many of websites that can get you world times these days, but if you do not want to get away from the command line, A way of getting the world time is by the tzselect command.
My webinar is in New York and New York is on the Eastern part of the United States. I chose Americas, United States, and then Eastern (most areas). tzselect gives you the variable to set if you want to make the change permanent.
$ tzselect Please identify a location so that time zone rules can be set correctly. Please select a continent, ocean, "coord", or "TZ". 1) Africa 2) Americas 3) Antarctica 4) Asia 5) Atlantic Ocean 6) Australia 7) Europe 8) Indian Ocean 9) Pacific Ocean 10) coord - I want to use geographical coordinates. 11) TZ - I want to specify the time zone using the Posix TZ format. #? 2 Please select a country whose clocks agree with yours. 1) Anguilla 19) Dominican Republic 37) Peru 2) Antigua & Barbuda 20) Ecuador 38) Puerto Rico 3) Argentina 21) El Salvador 39) St Barthelemy 4) Aruba 22) French Guiana 40) St Kitts & Nevis 5) Bahamas 23) Greenland 41) St Lucia 6) Barbados 24) Grenada 42) St Maarten (Dutch) 7) Belize 25) Guadeloupe 43) St Martin (French) 8) Bolivia 26) Guatemala 44) St Pierre & Miquelon 9) Brazil 27) Guyana 45) St Vincent 10) Canada 28) Haiti 46) Suriname 11) Caribbean NL 29) Honduras 47) Trinidad & Tobago 12) Cayman Islands 30) Jamaica 48) Turks & Caicos Is 13) Chile 31) Martinique 49) United States 14) Colombia 32) Mexico 50) Uruguay 15) Costa Rica 33) Montserrat 51) Venezuela 16) Cuba 34) Nicaragua 52) Virgin Islands (UK) 17) Curaçao 35) Panama 53) Virgin Islands (US) 18) Dominica 36) Paraguay #? 49 Please select one of the following time zone regions. 1) Eastern (most areas) 16) Central - ND (Morton rural) 2) Eastern - MI (most areas) 17) Central - ND (Mercer) 3) Eastern - KY (Louisville area) 18) Mountain (most areas) 4) Eastern - KY (Wayne) 19) Mountain - ID (south); OR (east) 5) Eastern - IN (most areas) 20) MST - Arizona (except Navajo) 6) Eastern - IN (Da, Du, K, Mn) 21) Pacific 7) Eastern - IN (Pulaski) 22) Alaska (most areas) 8) Eastern - IN (Crawford) 23) Alaska - Juneau area 9) Eastern - IN (Pike) 24) Alaska - Sitka area 10) Eastern - IN (Switzerland) 25) Alaska - Annette Island 11) Central (most areas) 26) Alaska - Yakutat 12) Central - IN (Perry) 27) Alaska (west) 13) Central - IN (Starke) 28) Aleutian Islands 14) Central - MI (Wisconsin border) 29) Hawaii 15) Central - ND (Oliver) #? 1 The following information has been given: United States Eastern (most areas) Therefore TZ='America/New_York' will be used. Selected time is now: Sat Nov 24 08:39:09 EST 2018. Universal Time is now: Sat Nov 24 13:39:09 UTC 2018. Is the above information OK? 1) Yes 2) No #? 1 You can make this change permanent for yourself by appending the line TZ='America/New_York'; export TZ to the file '.profile' in your home directory; then log out and log in again. Here is that TZ value again, this time on standard output so that you can use the /usr/bin/tzselect command in shell scripts: America/New_York
© Lightnetics 2024