The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
conversion of unix time format sari Windows & DOS: Issues & Discussions 2 03-02-2008 11:33 PM
Conversion of time structure in C++ electroon High Level Programming 1 01-05-2008 06:42 AM
Linux Going Big Time and Prime Time Against Windows, UNIX (WSJ) (Addict 3D) iBot UNIX and Linux RSS News 0 06-21-2007 01:10 PM
conversion from EPOCH timestamp to local time zone abhijeetkul Shell Programming and Scripting 2 02-17-2006 03:19 AM
Dos to Unix conversion john413 Shell Programming and Scripting 1 09-10-2005 12:13 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-22-2002
Registered User
 

Join Date: Jul 2001
Location: Mumbai
Posts: 8
Question Time conversion in Unix

Hi,

Is there any way to get current time for a particular country using any unix command ?

I mean, If i want to find out current time in US or UK or anything ....

Any command or library routine available for that?
How it can be done in C on Unix?

Can anybody help me?

Thanks

--
Kamlakar
__________________

Thanks and Ragards

--
kam
Forum Sponsor
  #2  
Old 04-22-2002
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Look at the the gettimeofday() system call. It can deal with timezones. Alternately at the command line you could just do something like:

TZ=GMT0 date

Which would return the Dreenwhich Mean Time (aka UTC). You could substitute any timezone specification:

TZ=PST8PDT date
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:20 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0