.
Dim dateString, format As String
Dim result As Date
Dim provider As Globalization.CultureInfo = Globalization.CultureInfo.InvariantCulture
' Parse date and time with custom specifier.
' 20.01.2013 04:46:54
dateString = Args(2)
Dim strDate2 As String
Try
If Month("01-02-03") = 1 Then
strDate2 = DateTime.ParseExact(Args(2),
"dd.MM.yyyy hh:mm:ss",
provider).ToString("MM.dd.yyyy hh:mm:ss")
result = Date.ParseExact(strDate2, "MM.dd.yyyy hh:mm:ss", provider)
Else
result = Date.ParseExact(Args(2), "dd.MM.yyyy hh:mm:ss", provider)
End If
Catch e As FormatException
CFunc.Status("Error: Converting Date Failed!") ' Status setzem
End Try
Try
File.SetLastWriteTime(Args(0).Remove(Args(0).Length - 3), result)
Catch e As FormatException
CFunc.Status("Error: SetLastWriteTime Failed!") ' Status setzem
End Try
Because the time format changes on every persons computer...Quote:
Why did not you just changed the PHP part ?
' Datei überprüfen
Public Shared Sub FileCheck(ByVal Param() As String)
If File.Exists(Param(0)) Then
If Not New FileInfo(Param(0)).LastWriteTime = DateTime.ParseExact(Param(2), "dd.MM.yyyy HH:mm:ss", CultureInfo.InvariantCulture) Or Not New FileInfo(Param(0)).Length = Param(1) Or (Config.UseMd5Check AndAlso Not Param(3) = CFunc.MD5FileHash(Param(0))) Then
CFunc.DeleteFile(Param(0))
CFunc.PatchList = CFunc.AddLineToStringArray(CFunc.PatchList, Param(0) & ".gz" & vbTab & Param(1) & vbTab & Param(2))
CFunc.MaxUpdate += 1
End If
Else
CFunc.PatchList = CFunc.AddLineToStringArray(CFunc.PatchList, Param(0) & ".gz" & vbTab & Param(1) & vbTab & Param(2))
CFunc.MaxUpdate += 1
End If
End Sub
Quote:
I'm gonna fix it in an another faster way.
My way only needs 2 lines.
Edit:
Ich habe jetzt schonmal zwei kleinere Änderungen durchgenommen.
- Es gab bei Usern mit dem MM.dd.yyyy Format einen Error, da diese nicht unser Datum format haben, dies wurde gefixxt.
- Man kann jetzt in den Konfigs die Farbe des Start Button auch bestimmen.
[Only registered and activated users can see links. Click Here To Register...]