?
Solved

Time zone problem

Posted on 2004-04-13
8
Medium Priority
?
283 Views
Last Modified: 2010-04-21
I am working on time zones here. Does unix provide any utility which gives difference bet UST and local times in terms of secs.

I am ware of the TZ varibale which gives me the diff, but i want something in seconds.
0
Comment
Question by:raj_paps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 10817337
Timezones are all integer multiples of an hour. So if you know the offset from GMT just multiply by 3600 to get the offset in seconds.
0
 
LVL 5

Expert Comment

by:mrfixit22
ID: 10818488
You can see if one of these are available gettimeofday(), ftime(), time()
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10818776
Not all timezones are multiples of an hour.  There are a number of timezones that are 30 mins diff and even one that is 45 mins (from memory).

raj_paps, are you willing to use Perl?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Author Comment

by:raj_paps
ID: 10820157
I am using a properiety language here.
Just want to know is there any env variable in Unix which gives me time zone diff in seconds..?
0
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 10820198
No.  There are no environment variables that can give you that information.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 10822435
> .. is there any env variable in Unix which gives me time zone diff in seconds
no.
0
 

Author Comment

by:raj_paps
ID: 10823597
Thanx for the help....
Unix does not give anything in seconds..Please close this question
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question