Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-17-2007, 10:24 AM   #1
LQ Newbie
Registered: Apr 2006
Distribution: Ubuntu
Posts: 14

Rep: Reputation: 0
how to display the current time at a different timezone

Hi all,

I'm in need of a cli application that can display the current time at a specified timezone.
I thought 'date' should be able to do the job, but I was surprised to learn that I was wrong (or was I?)
Old 07-17-2007, 10:39 AM   #2
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,703

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
With some hints, date can do it:
$ TZ=CET date; TZ=UTC date; TZ=Hongkong date; TZ=Montreal date
Tue Jul 17 17:38:25 CEST 2007
Tue Jul 17 15:38:25 UTC 2007
Tue Jul 17 23:38:25 HKT 2007
Tue Jul 17 15:38:25 Montreal 2007
Old 07-17-2007, 10:53 AM   #3
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
Good news:
[yves@server ~]$ date
mar jui 17 17:51:30 CEST 2007
[yves@server ~]$ TZ=GMT-5 date
mar jui 17 20:52:46 GMT 2007
Old 07-18-2007, 03:41 AM   #4
LQ Newbie
Registered: Apr 2006
Distribution: Ubuntu
Posts: 14

Original Poster
Rep: Reputation: 0
That's great, thank you both!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
question about setting the timezone and time willyweedle Linux - Newbie 1 03-30-2007 11:12 AM
TimeZone change doesn't effect current process cruiserfriend Linux - Software 4 01-17-2006 03:27 AM
System time won't accept new timezone mustangfanatic01 Slackware 4 11-22-2005 07:34 PM
default Timezone display sailu_mvn Fedora 1 03-28-2005 02:36 AM
setting the correct time & timezone from kde? Jelle Debian 8 07-03-2004 10:08 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:20 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration