GMT time to Local Time Translation (ASP)

zhaozj2021-02-16  102

'==================================================== ==================== Function: GMT Tour を ロ ー ル 日 日 付 に 変 す'Quotes:' GMT return 'return 値 値: ー カ 日 日 付' ===================================== ==================================================================================================================================================================================00

IF SG_BLNERRORRESUMENEXT THEN ON ERROR RESUME NEXT END END END IF

DIM INTTIME DIM INTMINUTE DIM DTTEMPDATE DIM DTOUTDATE

If Left (SG_strTimeZone, 3) <> "GMT" Then gfdtGMT2Local = GMTDate Exit Function Else Select Case Mid (SG_strTimeZone, 4, 1) Case " " intTime = Mid (SG_strTimeZone, 5, 2) intMinute = Mid (SG_strTimeZone, 8 , 2) If 0 <= intTime And intTime <24 Then If 0 <= intMinute And intMinute <60 Then dtTempDate = DateAdd ( "h", intTime, GMTDate) dtOutDate = DateAdd ( "n", intMinute, dtTempDate) Else gfdtGMT2Local = GMTDate Exit Function End If Else gfdtGMT2Local = GMTDate Exit Function End If Case "-" intTime = Mid (SG_strTimeZone, 5, 2) intMinute = Mid (SG_strTimeZone, 8, 2) If 0 <= intTime And intTime <24 Then If 0 < = intMinute And intMinute <60 Then dtTempDate = DateAdd ( "h", -intTime, GMTDate) dtOutDate = DateAdd ( "n", -intMinute, dtTempDate) Else gfdtGMT2Local = GMTDate Exit Function End If Else gfdtGMT2Local = GMTDate Exit Function End If Case Else GFDTGMT2LOCAL = GMTDATE EXIT FU NCTION End SELECT END IF GFDTGMT2LOCAL = CDATE (DTOUTDATE) END FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-10655.html

New Post(0)