void test(uint32 t)
{
struct tm *ptr;
time_t lt;
lt = t;//time(NULL);1471421956
ptr=localtime(<);
printf("second:%d\n",ptr->tm_sec);
printf("minute:%d\n",ptr->tm_min);
printf("hour:%d\n",ptr->tm_hour);
printf("week:%d\n",ptr->tm_wday);
printf("mday:%d\n",ptr->tm_mday);
printf("month:%d\n",ptr->tm_mon+1);
printf("year:%d\n",ptr->tm_year+1900);
}
int main(void)
{
test(1471421956);
while(1);
return 0;
}
{
struct tm *ptr;
time_t lt;
lt = t;//time(NULL);1471421956
ptr=localtime(<);
printf("second:%d\n",ptr->tm_sec);
printf("minute:%d\n",ptr->tm_min);
printf("hour:%d\n",ptr->tm_hour);
printf("week:%d\n",ptr->tm_wday);
printf("mday:%d\n",ptr->tm_mday);
printf("month:%d\n",ptr->tm_mon+1);
printf("year:%d\n",ptr->tm_year+1900);
}
int main(void)
{
test(1471421956);
while(1);
return 0;
}