time
来源:互联网 发布:如何更改本机端口号 编辑:程序博客网 时间:2024/05/07 18:05
time_t now = time(NULL); struct tm *tm; //struct tm *localtime(const time_t *timep); tm = localtime(&now); char buffer[128];#if 0 struct tm {int tm_sec;/* seconds */int tm_min;/* minutes */int tm_hour;/* hours */int tm_mday;/* day of the month */int tm_mon;/* month */int tm_year;/* year */int tm_wday;/* day of the week */int tm_yday;/* day in the year */int tm_isdst;/* daylight saving time */ };#endif memset(buffer,0, sizeof(buffer)); //int snprintf(char *str, size_t size, const char *format,...); snprintf(buffer, sizeof(buffer) - 1, "Current time: %04d-%02d-%02d %02d:%02d:%02d\n", tm->tm_year + 1900, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
get local time promming
- time
- time
- TIME
- Time
- TIME
- Time
- time
- Time
- time
- time
- time
- time
- Time
- TIME
- time
- time
- Time
- time
- servlet javabean
- Guid
- Qt链接Ws2_32.lib
- Microsoft Excel 常量(上)
- SqlServer复杂Sql执行
- time
- 两个栈模拟一个队列
- 寻找二叉树两节点的最近的公共祖先[转载+整理]
- 《看日记学git》
- VoIP中G.729与G.711的部分资料
- AndEngine Tutorial: Touch & Drag Sprites
- Microsoft Excel 常量(下)
- 毕业季挚言
- ubuntu12.04中shell脚本无法使用source的原因及解决方法