Link to home
Start Free TrialLog in
Avatar of ajoshi79

asked on

Time zone conversion


I am working on C++/unix environment and my database is informix.i am taking current time as local time using time(0)function. i wanted to know that is there an API or any time function which will convert this current-local time to any specific time zone. say for example my program is running in Central Time Zone and that gives me localtime which is CST, but i need time in EST.
Or is there any function/API which directy gives me time in any specific time zone. say for example irrespective of local time that gives me time in EST.

Avatar of Salte

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of burcarpat

check out

for a peer-reviewed date-time library, supported by many c++ standards committee members via  the lib is cross-platform and works with many platforms and compilers w/o any problems and it's 100% free ( i.e. free for commercial use, etc. )

the lib does have local time adjustments support, for docs of that part, see
Avatar of ajoshi79


Thanks for yor valuable suggestions.
It worked the way you suggested.