Transformation of LOCAL time to GMT time (ASP)

zhaozj2021-02-16  103

'==================================================== ==================== Function: ー カ ル 日 付 g GMT 日 付 に 変 す す'Quotes:' ー カ 日 日 付 'return 値: GMT return' ===================================== ========================================================================================================================================= #

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 gfdtLocal2GMT = LocalDate 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", -ITTIME, LOCALDATE) DTOUTDATE = DATEADD ("N", -INTMINUTE, DTTEMPDATE

Else gfdtLocal2GMT = LocalDate Exit Function End If Else gfdtLocal2GMT = LocalDate 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, LocalDate) dtOutDate = DateAdd ( "n", intMinute, dtTempDate) Else gfdtLocal2GMT = LocalDate Exit Function End If Else gfdtLocal2GMT = LocalDate Exit Function End If Case Else GFDTLOCAL2GMT = Localdate EXIT FUNCAL2GMT = CDATE (DTOUTDATE) END FUNCTION

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

New Post(0)