当前位置:网站首页>Time processing in C language (conversion between string and timestamp)
Time processing in C language (conversion between string and timestamp)
2022-06-12 13:29:00 【Boring ah le】
C Time processing in language ( String and timestamp conversion )
// One 、 Convert... To time stamp
//strfmt
void metis_strftime(time_t t, char *pcTime)
{
struct tm *tm_t;
tm_t = localtime(&t);
strftime(pcTime,128,"%F %T",tm_t);
}
// Two 、 Convert a string to a timestamp
long metis_strptime(char *str_time)
{
struct tm stm;
strptime(str_time, "%Y-%m-%d %H:%M:%S",&stm);
long t = mktime(&stm);
return t;
}
边栏推荐
- [cloud native | kubernetes] in depth understanding of deployment (VIII)
- [EDA] chip layout design: VLSI layout design using electric
- import torch_geometric 第一个图网络例子
- torch_ About the geometric Mini batch
- 基于华为云鲲鹏弹性云服务器ECS部署openGauss数据库【这次高斯不是数学家】
- 在 Debian 10 上独立安装MySQL数据库
- Pytorch framework
- [cloud native | kubernetes] kubernetes networkpolicy
- Will the next star of PPT for workplace speech be you [perfect summary] at the moment
- Application of short circuit expression (||) in C language
猜你喜欢

How to adapt the page size when iframe is embedded in a web page
![Mui login database improvement and Ajax asynchronous processing [mui+flask+mongodb+hbuilderx]](/img/11/ce929f1cfbdcf245db9ee53bfe7a84.png)
Mui login database improvement and Ajax asynchronous processing [mui+flask+mongodb+hbuilderx]

torch_geometric mini batch 的那些事

Script引入CDN链接提示net::ERR_FILE_NOT_FOUND问题

看完这一篇就够了,web中文开发

Installation of pagoda

创新实训(十)高级界面美化

Application of binary search -- finding the square root sqrt of a number

STM32F1与STM32CubeIDE编程实例-设备驱动-EEPROM-AT24C256驱动

leetcode 47. Permutations II full permutations II (medium)
随机推荐
Volume mount and mirror creation
2067: [example 2.5] circle
微信web开发者工具使用教程,web开发问题
Pre research of image scanning tool
NVIDIA Jetson Nano Developer Kit 入门
创新实训(十)高级界面美化
2061: [example 1.2] trapezoidal area
R language ggplot2 visualization: use the ggrep package to add a number label to the data point at the end of the line plot
1002: output the second integer
Install MySQL database independently on Debian 10
Openstack network
创新实训(十一)开发过程中的一些bug汇总
Seeking magic square of order n with C language
单向环形链表实现约瑟夫环
Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
Script引入CDN链接提示net::ERR_FILE_NOT_FOUND问题
1001:Hello,World
C#DBHelper_FactoryDB_GetConn
LeetCode滑动窗口刷题总结
Embedded system hardware composition - embedded system hardware architecture