Sub checkfileTime
Dim fi As HttpJob
fi.Initialize("getfiles", Me)
fi.Download2(changedftp & "/lists/files.php", Array As String("Null", "Null"))
End Sub
'....
Case "getfiles"
res = job.GetString
Dim parser As JSONParser
parser.Initialize(res)
Dim ListOfFiles As List
ListOfFiles = parser.NextArray
Log(ListOfFiles.Size)
If ListOfFiles.Size > 0 Then
For i = 0 To ListOfFiles.Size - 1
Log(">> File: " & ListOfFiles.Get(i))
Dim str() As String = Regex.Split("\|",ListOfFiles.Get(i))
Dim mynr As String = str(0)
mynr = mynr.Replace(".txt","")
If mynr = LineNumber Then
Dim date As String = str(1)
Dim time As String = str(2)
date = date.Replace("-","/")
DateTime.DateFormat = "dd/MM/yyyy"
Log("test date: " & date & "|" & time)
Dim newdate As Long = DateTime.DateTimeParse(date,time)
'newdate = newdate + (DateTime.TicksPerHour * 2)'new server
Log(DateTime.date(newdate) & "|" & DateTime.time(newdate))
Dim olddate As Long = File.LastModified(File.DirInternal,LineNumber & ".txt")
Log("olddate: " & DateTime.date(olddate) & "|" & DateTime.time(olddate))
If newdate > olddate Then updatedownload
Exit
End If
Next
End If