2017-05-23 3 views

답변

0

몇 가지 방법이 있습니다. 당신은 현재 날짜를 표시해야하는 경우이를 사용할 수 있습니다처럼

show_message("Today is " + string(current_day) + "/" + string (current_month) + "/" + string(current_year) + " - " + string(current_hour) + ":" + string(current_minute) + "." + string(current_second) +"."); 

이 뭔가를 반환합니다. "오늘은 2017년 3월 6일입니다 - 23시 40분 15초"

1

GML에서 현재 날짜를 여러 가지 방법으로 가져올 수 있습니다. 가장 쉬운 방법은 아마도 current_second, current_minute, current_hour, current_day, current_weekday, current_month, current_year 변수를 사용하는 것입니다.

다음은 일, 월, 연도를 표시하는 예제입니다.

draw_text(32, 32, "Today is " + string(current_day) + "/" + string (current_month) + "/" + string(current_year) +"."); 

date_set_timezone (timezone)을 사용하여 시간대를 변경할 수 있습니다. 사용 가능한 시간대는 timezone_utc 및 timezone_local입니다.

날짜를 가져 오는 또 다른 방법은 date_current_datetime();

myhour = date_get_hour(date_current_datetime()); 
myday = date_get_day(date_current_datetime()); 
관련 문제