void OnStart()
{
//--- 서머 타임 조정을 초 단위로 가져옵니다.
int sec_dl=TimeDaylightSavings();
//--- 수신된 값을 설명하는 텍스트를 생성합니다.
string text=(sec_dl==0 ? "Standard \"winter\" time is used" :
StringFormat("Daylight saving time has been switched over. The correction is %d seconds", sec_dl));
//--- 로그에 서머 타임 조정에 대한 설명을 초 단위로 표시합니다.
Print(text);
/*
Result for "winter" time:
Standard "winter" time is used
Result for "summer" time:
Daylight saving time has been switched over. The correction is -3600 seconds
*/
}
|