📄 gm
字号:
@c ----------------------------------------------------------------------
@node gmtime, time
@heading @code{gmtime}
@subheading Syntax
@example
#include <time.h>
struct tm *gmtime(const time_t *tod);
@end example
@subheading Description
Converts the time represented by @var{tod} into a structure.
The return structure has this format:
@example
struct tm @{
int tm_sec; /* seconds after the minute [0-60] */
int tm_min; /* minutes after the hour [0-59] */
int tm_hour; /* hours since midnight [0-23] */
int tm_mday; /* day of the month [1-31] */
int tm_mon; /* months since January [0-11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday [0-6] */
int tm_yday; /* days since January 1 [0-365] */
int tm_isdst; /* Daylight Savings Time flag */
long tm_gmtoff; /* offset from GMT in seconds */
char * tm_zone; /* timezone abbreviation */
@};
@end example
@subheading Return Value
A pointer to a static structure which is overridden with each call.
@subheading Example
@example
time_t x;
struct tm *t;
time(&x);
t = gmtime(&t);
@end example
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -