linux c 时间
来源:互联网 发布:gta5人物捏脸数据美女 编辑:程序博客网 时间:2024/05/22 08:01
/*
* envtime.c
*
* Created on: Apr 13, 2013
* Author: jwang
*/
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
struct tm *tm_ptr;
time_t the_time;
(void)time(&the_time);
tm_ptr = gmtime(&the_time);
printf("Raw time is %ld\n", the_time);
printf("gmtime gives:\n");
printf("date: %02d/%02d/%02d\n",tm_ptr->tm_year,tm_ptr->tm_mon + 1,tm_ptr->tm_mday);
printf("time: %02d:%02d:%02d\n",tm_ptr->tm_hour,tm_ptr->tm_min,tm_ptr->tm_sec);
printf("The date is : %s", ctime(&the_time));
return 0;
}
* envtime.c
*
* Created on: Apr 13, 2013
* Author: jwang
*/
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
struct tm *tm_ptr;
time_t the_time;
(void)time(&the_time);
tm_ptr = gmtime(&the_time);
printf("Raw time is %ld\n", the_time);
printf("gmtime gives:\n");
printf("date: %02d/%02d/%02d\n",tm_ptr->tm_year,tm_ptr->tm_mon + 1,tm_ptr->tm_mday);
printf("time: %02d:%02d:%02d\n",tm_ptr->tm_hour,tm_ptr->tm_min,tm_ptr->tm_sec);
printf("The date is : %s", ctime(&the_time));
return 0;
}
- LINUX C 时间操作
- Linux C | 时间测量
- Linux C 时间函数
- linux c 时间处理
- linux c 时间
- Linux C 时间函数
- linux C时间处理
- Linux C 时间相关
- Linux C 时间服务器
- linux c 获得时间和设置时间
- linux C 日期时间篇
- linux C 之时间函数
- linux C获取系统时间
- Linux C 时间操作实例
- linux C 获取日期时间
- linux c 获取系统时间
- linux c语言获取时间
- Linux C获取系统时间
- java-正则表达式判断手机号
- 孙子兵法之作战篇
- BT6无线破解+局域网共享(附BT6下载地址)
- 设置word新建后打开为指定的模板
- lsnrctl: error while loading shared libraries: /opt/app/oracle/product/11.2/db_1/lib/libclntsh.so.11
- linux c 时间
- JQuery EasyUI DataGrid获取当前行索引及快速清空
- Uva 465 - Overflow
- 孙子兵法之谋攻篇
- 关于as3
- C++ODBC和ADO方式连接SQL数据库
- google gflags 使用方法
- C++ 虚 重载操作符 virtual operator= 使用方法
- 孙子兵法之军形篇