https://gitlab.com/gambas/gambas/commit/3418ce77f35d79f999d76c3884c9076ac3cdae4a
Per localizzarla può andare bene questo codice secondo voi? *
Public Sub Main()
Select Case Sgn(System.TimeZone)
Case -1
Print Date.ToRFC822(Now, "+0" & CStr(Abs(System.TimeZone) / 3600) & "00")
Case +1
Print Date.ToRFC822(Now, "-0" & CStr(Abs(System.TimeZone) / 3600) & "00")
Case 0
Print Date.ToRFC822(Now)
End Select
'Print Date.FromRFC822(Date.ToRFC822(Now, "+0" & CStr(Abs(System.TimeZone) / 3600) & "00"))
End
Non ho mai scritto codice per la posta elettronica e quindi non so neanche se può essere utile.
:ciao: :ciao:
* Leggi il post successivo
C'era un bug insito nel codice precedente perché non avevo tenuto conto delle zone orarie con differenze di due cifre, così dovrebbe funzionare:
Public Sub Main()
Dim s As String
Dim i As Integer
i = Abs(System.TimeZone / 3600)
If Len(CStr(i)) = 1 Then
s = "0" & CStr(i) & "00"
Else
s = CStr(i) & "00"
Endif
Select Case Sgn(System.TimeZone)
Case -1
Print Date.ToRFC822(Now, "+" & s)
Case +1
Print Date.ToRFC822(Now, "-" & s)
Case 0
Print Date.ToRFC822(Now)
End Select
End
:ciao: :ciao: