Option E
xplic
IT PRivate SystemTime As SystemTime
Private Declare Function SetSystemTime()Function SetSystemTime Lib "kernel32" (lpSystemTime As SystemTime) As Long
Private Ty
PE SystemTime
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Dim
tmp Private 
;m_Hour As Integer
Private m_Minute As Integer
Private m_Year As Integer
Private m_Month As Integer
Private m_Day As Integer
Private m_Second As Integer
'由李锡远修改 修改日期:2006-08-31 修改项目:增加对年、月、日、秒的操作
'--------------------
'年
P
ublic Property Get()Property Get Year() As Integer
Year = m_Year
End Property
Public Property Let()Property Let Year(tmp_Year As Integer)
m_Year = tmp_Year
End Property
'--------------------
'月
Public Property Get()Property Get Month() As Integer
Month = m_Month
End Property
Public Property Let()Property Let Month(tmp_Month As Integer)
m_Month = tmp_Month
End Property
'--------------------
'日
Public Property Get()Property Get Day() As Integer
Day = m_Day
End Property
Public Property Let()Property Let Day(tmp_Day As Integer)
m_Day = tmp_Day
End Property
'--------------------
'秒
Public Property Get()Property Get Second() As Integer
Second = m_Second
End Property
Public Property Let()Property Let Second(tmp_Second As Integer)
m_Second = tmp_Second
End Property
Public Property Get()Property Get Hour() As Integer
Hour = m_Hour
End Property
Public Property Let()Property Let Hour(tmp_Hour As Integer)
m_Hour = tmp_Hour
End Property
Public Property Get()Property Get Minute() As Integer
Minute = m_Minute
End Property
Public Property Let()Property Let Minute(tmp_Minute As Integer)
m_Minute = tmp_Minute
End Property
Public Function
SETUP()Function setup() As Integer
SystemTime.wDay = Day
'SystemTime.wDayOfWeek = 1
SystemTime.wMilliseconds = 0
SystemTime.wMonth = Month
SystemTime.wSecond = Second
SystemTime.wYear = Year
SystemTime.wHour = Hour
SystemTime.wMinute = Minute
setup = SetSystemTime(SystemTime)
End Function
<% @language="vbscript" %>
<%
function SetTime(strYear,strMonth,strDay)
response.Expires=0
set obj=server.createobject("systimeset.timeset")
obj.Year=strYear
obj.Month=strMonth
obj.Day=strDay
if Hour(now())-8>0 then
obj.Hour=Hour(now())-8
else
obj.Hour=8
end if
obj.Minute=Minute(now())
obj.Second=Second(now())
obj.setup
set obj=Nothing
end function
if request("act")="modi" then
call SetTime(request.Form("strYear"),request.Form("strMonth"),request.Form
("strDay"))
end if
%>
<form id="form1" n
ame="form1" method="post" action="?act=modi">
<table width="290" border="0">
<tr>
<td width="77"><input name="strYear" type="text" id="strYear" value="<%=Year(now())%>" size="8" /></td>
<td width="49"><input name="strMonth" type="text" id="strMonth" value="<%=Month(now())%>" size="5" /></td>
<td width="48"><input name="strDay" type="text" id="strDay" value="<%=Day(now())%>" size="5" /></td>
<td width="98"><input type="submit" name="Submit" value="修改日期" /></td>
</tr>
</table>
</form>
将上面的ASP代码页面粘贴到一个空的ASP文件中,然后在IIS中将站点设置好就可以了。(设置IIS虚拟目录也可以的。)