运行 ❯
获取您
自己的
网站
×
更改方向
更改主题,深色/浅色
转到空间
#include <iostream> #include <ctime> using namespace std; int main() { time_t timestamp; time(×tamp); struct tm * myTime = localtime(×tamp); cout << asctime(myTime); return 0; } // Note: This example displays the server's local time, which may differ from your local time.