Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the equivelent of the MS specific GetLocalTime? 2

Status
Not open for further replies.

Mthales

Technical User
Feb 27, 2004
1,181
GB
Hi,
I'm trying to adapt some C++ code that has been working on a Microsoft System so that it works on a Unix system but I'm very new to this so please could someone help?

Within this code are calls to the Microsoft SDK function GetLocalTime. What would be the "equivalent" for Unix?

Thanks in advance
M

Trainee Chocolate Management Executive.
 
Code:
time_t t;
time(&t);
struct tm* p = localtime(&t);
because of localtime() ANSI Std library function prototype is:
Code:
struct tm *localtime( const time_t *timer );
 
Thank you very much for your help that was just what I needed to get me going in the right direction.

M

Trainee Chocolate Management Executive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top