I have this code and i use in my device.
PIC18F252 PCH compiler CCS 5.007
//t_time_stamp=3776590560; // 2019/09/04 12:56:00
utc_sec = t_time_stamp % 60; //int32
min_temp = t_time_stamp / 60; //float32
min_temp_int = t_time_stamp / 60; //int32
utc_min = min_temp_int % 60; //int32
hour_temp = min_temp / 60; //float32
hour_temp_int = min_temp / 60; //int32
utc_hour = hour_temp_int % 24; //int32
day_temp1 = hour_temp / 24; //float32
day_temp1_int = hour_temp / 24; //int32
day_temp2_int = day_temp1_int % 1461; //int32
utc_day_cnt = (day_temp2_int % 365) + 1;
utc_year_cnt = day_temp1 / 365.25; //int32 code here
It work correctly until 5 last month,
but hour_temp_int
is not correctly now; hour_temp_int
is 11 at 10:26 to 10:30 but it should be 10!
Only this parameter and at this time is not correct!
What is my mistake?
I change types float32 to unsigned float32 or float48 but i have Error