⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_date.c

📁 解吸SEED格式的源代码
💻 C
字号:
/* --------------------------------------------------------------------------  * - module: get_date() * - * - author: Chris Laughbon * - date  : Dec 7, 1994 * - purpose: gets the system date and time, returns date/time in seed time * -		  format; YYYY,DDD,HH:MM:SS.FFFF * -  * - Note:	  the fractional part is always zero! * - * --------------------------------------------------------------------------- */#include <stdio.h>#include <sys/time.h>#include <pwd.h>char *get_date(char *date_buf, int l){	struct timeval tp;	struct timezone tz;	struct tm *tm;	gettimeofday(&tp, &tz);	tm = (struct tm *)localtime(&tp.tv_sec);	strftime(date_buf, l, "%Y,%j,%H:%M:%S.0000", tm);	return date_buf;	}/* ------------------------------------------------------------------------ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -