tags:

views:

26

answers:

2

Hi all, when I use the 'date' command, our server gives the GMT time. But my current time should be GMT+8. How do I display my current time as GMT+8? Thanks in advance.

A: 

You need to set your time zone

zengr
Thanks zengr for your reply. But I have no root permission. (the server is badly maintain by a remote site admin.) Is there a way that I create a simple script, say myDate, to do it? Thanks.
Kenneth
So, you want to display your local time (GMT+8) when you type "date" in your remote server's terminal? I assume you login by SSH.
zengr
That's right. How can I do that? Thanks.
Kenneth
You got the answer by @caf :)
zengr
+1  A: 

Add the a line like this to your .profile file, then log out and in again:

TZ='Australia/Perth'; export TZ

The available timezones are usually in /usr/share/zoneinfo/.

caf
Thank you very much.. This is exactly what I want.
Kenneth