📄 ti
字号:
@c ----------------------------------------------------------------------
@node time, time
@heading @code{time}
@subheading Syntax
@example
#include <time.h>
time_t time(time_t *t);
@end example
@subheading Description
If @var{t} is not @code{NULL}, the current time is stored in @code{*t}.
@subheading Return Value
The current time is returned.
@subheading Example
@example
printf("Time is %d\n", time(0));
@end example
@c ----------------------------------------------------------------------
@node timezone, time
@heading @code{timezone}
@subheading Syntax
@example
#include <time.h>
char *timezone(int minutes, int daylight);
@end example
@subheading Description
Given the number of minutes west of GMT and whether or not daylight
savings time is in affect, returns the name of the timezone.
If the environment variable TZNAME is set, it should be like
@code{EST,EDT}, and the name of the timezone will come from that.
@subheading Return Value
A pointer to the timezone or @code{NULL} if invalid.
@subheading Example
@example
printf("EST ? %s\n", timezone(5*60, 0));
@end example
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -