mktime under WinCE??

Joined
Jun 9, 2008
Messages
3
Reaction score
0
Hi @ll,

does anyone know a functon that can be used to substitute mktime (under WinCE)?

I need to convert a SYSTEMTIME to time_t and so I wrote the following source code (to be honest, I found it in the www ;) ):
Code:
time_t TimeFromSystemTime(const SYSTEMTIME * pTime)
{
   struct tm tm;
   memset(&tm, 0, sizeof(tm));

   tm.tm_year = pTime->wYear - 1900;
   tm.tm_mon = pTime->wMonth - 1;
   tm.tm_mday = pTime->wDay;

   tm.tm_hour = pTime->wHour;
   tm.tm_min = pTime->wMinute;
   tm.tm_sec = pTime->wSecond;

   return mktime(&tm);
}

[Edit:] Function mktime causes a linker error because I don't have this function in my SDK. [/Edit]

Perhaps anyone has an idea how to solve this problem. This would really be great.

Regards,
 
Last edited:
Joined
Jun 9, 2008
Messages
3
Reaction score
0
Think I got it!!

I think I got it!

There is a function called wce_mktime and the parameters are the same. I assume the two functions behave equally.

Regards,
EiZi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,961
Messages
2,570,131
Members
46,689
Latest member
liammiller

Latest Threads

Top