Kevin Alden
|
strftime and gmtime invalid output
|
Kevin Alden
05/10/2010 10:55 AM
post54063
|
strftime and gmtime invalid output
Hello,
I am using QNX 6.3.0 and am seeing some strange behavior with strftime. The following is a code snippet:
//Convert back to GMT calendar structure
time = *(gmtime(&unix_time));
//Create time string for message
strftime(mTimeBuffer, sizeof(mTimeBuffer), "%Y-%m-%dT%H:%M:%S", &time);
After running my system for a few days I start seeing strange invalid outputs from strftime with years greater than 2038
.
Now it is my understanding that with a 32 bit value passed to gmtime, it should not be possible to receive a year passed
2038 as that is when unix time wraps 32 bits. Is there some way gmtime or strftime could be getting some invalid input
that could cause this?
Thanks
|
|
|