其他分享
首页 > 其他分享> > 你怎么舍得我难过

你怎么舍得我难过

作者:互联网

root@wisdom-B250-HD3:/tmp# cat 155136.c 
/*************************************************************************
	> File Name: 155136.c
	> Author: 
	> Mail: 
	> Created Time: 2019年09月18日 星期三 15时51分47秒
 ************************************************************************/

#include <stdio.h>
#include <time.h>

int main(void)
{
    time_t t_max = 0x7fffffff;

    printf("the max time is %s\n", asctime(gmtime(&t_max)));

    return 0;
}

root@wisdom-B250-HD3:/tmp# ./a.out 
the max time is Tue Jan 19 03:14:07 2038

root@wisdom-B250-HD3:/tmp# 

The function ctime() converts its argument into local time, which will vary from Coordinated Universal Time (also known as Greenwich Mean Time), depending on where you are on the globe. California, where this book was written, is eight hours behind London, and several years ahead.
We should really use the gmtime() function to obtain the largest UTC time value. This function doesn’t return a printable string, so we call asctime() to get this.

标签:怎么,tmp,function,max,Time,wisdom,舍得,time,难过
来源: https://blog.csdn.net/qq_35351687/article/details/100986026