View topic - timegm in QNX

Page 1 of 1

timegm in QNX

PostPosted: Fri Oct 23, 2015 3:19 am
by robby0524
I will port program to QNX from linux. There are not timegm API in the QNX.
Anybody have a idea for me?
My version is QNX 6.5(IDE4.7)
The program of linux:

struct tm t;
memset ( &t , 0 , sizeof ( struct tm ) );
// 1984/01/01 00:00:00
t.tm_year = 84;
t.tm_mon = 0;
t.tm_mday = 1;
t.tm_hour = 0;
t.tm_min = 0;
t.tm_sec = 0;

return timegm ( &t );

Re: timegm in QNX

PostPosted: Fri Oct 23, 2015 1:30 pm
by Tim
http://www.opensource.apple.com/source/ ... m/timegm.c

Here is some open source of timegm()

Tim