' Linux: fbc programa.bas ' Windows: install wget (winget install GnuWin32.WGet) & fbc programa.bas Dim As String sContent, sUTC, sRFC850, tmpFile, cmd ' Detect system and use temporary folder #Ifdef __FB_WIN32__ tmpFile = Environ("TEMP") & "\utctime.html" cmd = "wget -q -O """ & tmpFile & """ https://www.utctime.net" #Else tmpFile = "/tmp/utctime.html" cmd = "wget -q -O " & tmpFile & " https://www.utctime.net" #EndIf Shell cmd Dim As Integer ff = Freefile If Open(tmpFile For Input As #ff) <> 0 Then Print "Error: wget failed or file is not accessible." Sleep: End End If ' Read full content sContent = "" While Not Eof(ff) Dim As String linea Line Input #ff, linea sContent &= linea & Chr(10) Wend Close #ff ' Extract UTC and RFC 850 Dim As Integer utcStart = Instr(sContent, "UTC