void OnStart()
{
//--- 로컬 시간, GMT 및 GMT와 로컬 컴퓨터 시간의 차이를 초 단위로 가져옵니다.
datetime time_local=TimeLocal();
datetime time_gmt =TimeGMT();
int offset =TimeGMTOffset();
//--- 얻은 시간 및 오프셋 값을 로그에 표시합니다.
PrintFormat("Local Time: %s, GMT Time: %s, Seconds Offset: %+d", (string)time_local, (string)time_gmt, offset);
/*
결과:
Local Time: 2024.04.18 19:35:52, GMT Time: 2024.04.18 12:35:52, Seconds Offset: -25200
*/
}
|