Pelles C forum

C language => Pocket PC and Smartphone questions => Topic started by: gromit on December 06, 2010, 11:43:38 PM

Title: new Version 6.5 still does not allow localtime to work on pda
Post by: gromit on December 06, 2010, 11:43:38 PM
localtime and gmtime both show error of

Missing prototype for 'localtime'.


#include <time.h>
time_t now;
  struct tm *tm_now;
   now = time ( NULL );
  tm_now = localtime ( &now );

I Did think this was supposed to work in the latest version but perhaps not on PDA

Any Tips Gratefully recieved
gromit :o
Title: Re: new Version 6.5 still does not allow localtime to work on pda
Post by: ml on December 09, 2010, 08:29:06 PM
try

Code: [Select]
SYSTEMTIME SystemTime;
GetLocalTime(&SystemTime);

ml