主页
C 语言
C 日期和时间
demo_date_time
运行 ❯
×
更改方向
保存代码
更改主题
#include
#include
int main() { time_t currentTime; time(¤tTime); // Get the current time printf("Current time: %s", ctime(¤tTime)); return 0; } // Note: This example displays the server's local time, which may differ from your local time.
Current time: