Hi Javier,
This is the test harness I cobbled together to verify atotm ()
Usual disclaimers and, of course, Public Domain.
#include "atotm.h"
#include
#include
#include
int main (void)
{
time_t some_time;
char time_string[80];
struct tm global_timer;
struct tm *ref_tm;
time (&some_time);
strcpy (time_string,ctime (&some_time));
printf ("Initial time: %s",time_string);
ref_tm = localtime (&some_time);
printf ("Initial week day = %d, year day = %d\n",
ref_tm->tm_wday,ref_tm->tm_yday);
global_timer = atotm (time_string);
printf ("After conversion: %s",asctime(&global_timer));
printf ("Converted week day = %d, year day = %d\n",
global_timer.tm_wday,global_timer.tm_yday);
return 0;
}
George
* SLMR 2.1a * All Trademarks acknowledged (just in case ).
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)
|