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
*/
}
|