Hello,
I was using osal_ConvertUTCTime() function to convert time in sec (epoch time) to the time stamp when i encounter an issue when i am passing 31st May 2019 in seconds.
Example:
UTCTimeStruct my_time; utcEpochTime = 1559275405; //2019/5/31 @ 04:03:25 osal_ConvertUTCTime(&my_time, ( utcEpochTime - 944006400 ) //944006400 is used as we have calculated utcEpochTime from Jan 01 1970. (UTC)
When i read my_time variable it gives me following values
my_time.seconds = 25;
my_time.minutes = 03;
my_time.hour = 04;
my_time.day = 0;
my_time.month = 6;
my_time.year = 2019;
1.Why i am getting month as 6 and day as 0, everything else is correct ?
2. If i calculate thee same for any other date its working fine.
3. What is the solution for this?