ECN No Name Newsletter: January, 1993

The ECN No Name Newsletter is no longer being published. This is an archived issue.

[previous article]

Worldwide Time

NO NAME NEWSLETTER--January 1993

Worldwide Time.whtml Jeff Sponaugle


With the increase in worldwide traffic on Internet, students and faculty alike are finding themselves interacting with people from other countries. Engaging in conversations often requires good timing (i.e. both people being on-line at the same time.) In order to determine when someone might be logged on, it would be useful to know the local time in their part of the world. There is a built in command in C-shell to allow you to find out the time in any time zone. To find out the time in Poland, for example, you would type the following.

   setenv TZ Poland
   date
   setenv TZ localtime

This would tell you the time in Poland. The last command will set the TZ variable back to the local time; thus, if you reissue the date command, it will return localtime. For a list of what time zones are available, look in these directory

Sun       /usr/share/lib/zoneinfo
Gould     /etc/zoneinfo/ReadableDataFiles

Keep in mind that the name you set TZ to must be spelled exactly as listed in the files (including punctuation).

Frequent users of this "time teller" might like to set up a shell script in their personal bin directory.

  1. Cd to your bin directory.
  2. Create a file with your favorite editor. For this example the file was named wtime.
  3. Inside the file type the folowing 2 lines:
    #! /bin/sh
             TZ=$1  date

Close the file and type: chmod +x wtime

To use type wtime desired-location. For example "wtime Poland". Remember to rehash if you are running csh.


[prev] [up]


webmaster@ecn.purdue.edu
Last modified: Saturday, 02-Oct-99 10:15:06 EST

[HTML Check] HTML