Hopefully fixed all time related issues

This commit is contained in:
CaptainSegis 2019-08-03 18:37:07 -05:00
parent 0edd21f129
commit e1faeb362f
7 changed files with 10 additions and 10 deletions

View File

@ -67,7 +67,7 @@
Dim PickDate As Date = New Date(CInt(d(0)), CInt(d(1)), CInt(d(2)), CInt(d(3)), CInt(d(4)), CInt(d(5))) Dim PickDate As Date = New Date(CInt(d(0)), CInt(d(1)), CInt(d(2)), CInt(d(3)), CInt(d(4)), CInt(d(5)))
Dim diff As Integer = (Date.Now - PickDate).Hours Dim diff As Integer = CInt((Date.Now - PickDate).TotalHours)
Dim hasToDiff As Integer = 24 Dim hasToDiff As Integer = 24
If P3D.World.CurrentSeason = P3D.World.Seasons.Winter Or P3D.World.CurrentSeason = P3D.World.Seasons.Fall Then If P3D.World.CurrentSeason = P3D.World.Seasons.Winter Or P3D.World.CurrentSeason = P3D.World.Seasons.Fall Then

View File

@ -38,7 +38,7 @@
Me.CreateWorldEveryFrame = True Me.CreateWorldEveryFrame = True
End Sub End Sub
Private Sub InitBerry(ByVal oldDate As String) Private Sub InitBerry(ByVal oldDate As String)
Dim Data() As String = oldDate.Split(CChar(",")) Dim Data() As String = oldDate.Split(CChar(","))
Dim d As New Date(CInt(Data(0)), CInt(Data(1)), CInt(Data(2)), CInt(Data(3)), CInt(Data(4)), CInt(Data(5))) Dim d As New Date(CInt(Data(0)), CInt(Data(1)), CInt(Data(2)), CInt(Data(3)), CInt(Data(4)), CInt(Data(5)))
@ -48,7 +48,7 @@
NewTexture() NewTexture()
Else Else
With My.Computer.Clock.LocalTime With My.Computer.Clock.LocalTime
Dim diff As Integer = (Date.Now - d).Seconds Dim diff As Integer = CInt((Date.Now - d).TotalSeconds)
Grow += diff Grow += diff

View File

@ -32,7 +32,7 @@
If IndicedStats.Contains(statName.ToLower()) = False Then If IndicedStats.Contains(statName.ToLower()) = False Then
If statName.ToLower() = "steps taken" Then If statName.ToLower() = "steps taken" Then
TempSteps += 1 TempSteps += 1
If (Date.Now - lastStepTime).Seconds >= 20 Then If CInt((Date.Now - lastStepTime).TotalSeconds) >= 20 Then
lastStepTime = Date.Now lastStepTime = Date.Now
Return True Return True
End If End If

View File

@ -28,7 +28,7 @@
End Sub End Sub
Shared Sub Ping() Shared Sub Ping()
Dim diff As Integer = (Date.Now - LastPing).Seconds Dim diff As Integer = CInt((Date.Now - LastPing).TotalSeconds)
If diff >= 30 Then If diff >= 30 Then
Logger.Debug("Ping session...") Logger.Debug("Ping session...")

View File

@ -419,7 +419,7 @@
Dim d() As String = ApricornData(2).Split(CChar(",")) Dim d() As String = ApricornData(2).Split(CChar(","))
Dim gaveDate As Date = New Date(CInt(d(0)), CInt(d(1)), CInt(d(2)), CInt(d(3)), CInt(d(4)), CInt(d(5))) Dim gaveDate As Date = New Date(CInt(d(0)), CInt(d(1)), CInt(d(2)), CInt(d(3)), CInt(d(4)), CInt(d(5)))
diff = (Date.Now - gaveDate).Minutes diff = CInt((Date.Now - gaveDate).TotalMinutes)
End If End If
End If End If
Next Next

View File

@ -375,15 +375,15 @@ nextScript:
Dim diff = date1 - date2 Dim diff = date1 - date2
Select Case format Select Case format
Case "days", "day" Case "days", "day"
If diff.Days >= value Then If CInt(diff.TotalDays) >= value Then
remove = True remove = True
End If End If
Case "minutes", "minute" Case "minutes", "minute"
If diff.Minutes >= value Then If CInt(diff.TotalMinutes) >= value Then
remove = True remove = True
End If End If
Case "seconds", "second" Case "seconds", "second"
If diff.Seconds >= value Then If CInt(diff.TotalSeconds) >= value Then
remove = True remove = True
End If End If
Case "years", "year" Case "years", "year"
@ -399,7 +399,7 @@ nextScript:
remove = True remove = True
End If End If
Case "hours", "hour" Case "hours", "hour"
If diff.Hours >= value Then If CInt(diff.TotalHours) >= value Then
remove = True remove = True
End If End If
Case "dayofweek" Case "dayofweek"

Binary file not shown.