홈 · 개발 참고자료

개발 참고자료

[파워빌더 Api] Local PC의 System 시간 변경 방법

작성자
왕희복
작성일
2016-07-14
조회
10709
분류
파워빌더
Global External Function을 선언합니다.
---------------------------------------------------------
Function Long SetSystemTime (ref SYSTEMTIME lpSystemTime ) Library "kernel32"
---------------------------------------------------------
다음과 같이 Structure를 생성합니다.
global type systemtime from structure
integer wyear
integer wmonth
integer wdayofweek
integer wday
integer whour
integer wminute
integer wsecond
integer wmilliseconds
end type
---------------------------------------------------------
Script 기술 부분입니다.

SYSTEMTIME lstr_SYSTEMTIME
Long ll_rtn

lstr_SYSTEMTIME.wYear = 2000 //년
lstr_SYSTEMTIME.wMonth = 10 //월
lstr_SYSTEMTIME.wDay = 15 //일
lstr_SYSTEMTIME.wHour = 12 - 9 // - 9는 표준시간 (서울) 입니다 - 따라서 12시로 Setting 됨. (국가별로 틀리겠죠.)
lstr_SYSTEMTIME.wMinute = 10 //분
lstr_SYSTEMTIME.wSecond = 0 //초
lstr_SYSTEMTIME.wDayOfWeek = 3 // 요일 (일요일부터 1,2,3,...)
lstr_SYSTEMTIME.wMilliseconds = 0 // 밀리초

ll_rtn = SetSystemTime(lstr_SYSTEMTIME)

IF ll_rtn <> 1 THEN Return 0

Return 1