Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add region support type double #481

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Version Control.accda.src/modules/modUtcConverter.bas
Original file line number Diff line number Diff line change
Expand Up @@ -815,12 +815,12 @@ End Function
Private Function ConvTimeUTC(ByRef InVal As String) As Date

Dim varParts As Variant
Dim InValSeconds As String
Dim InValSeconds As Double

If InVal Like "##:##:##.###Z" Then
' Use high-performance conversion to date
varParts = Split(InVal, ":")
InValSeconds = Mid(varParts(2), 1, Len(varParts(2)) - 1)
InValSeconds = Val(Mid(varParts(2), 1, Len(varParts(2)) - 1))
ConvTimeUTC = TimeSerialDbl(varParts(0), varParts(1), InValSeconds)
Else
' Fall back to slower RegEx function
Expand Down Expand Up @@ -866,7 +866,7 @@ Private Function ConvTimeUTC2(ByRef InVal As String) As Date
If Not (IsEmpty(.SubMatches(3)) Or IsEmpty(.SubMatches(5)) Or NzEmpty(.SubMatches(3), ISO8601UTCTimeZone) = ISO8601UTCTimeZone) Then _
dblMinutes = dblMinutes - CDbl(NzEmpty(.SubMatches(3), vbNullString) & NzEmpty(.SubMatches(5), vbNullString))

dblSeconds = CDbl(NzEmpty(.SubMatches(2), vbNullString))
dblSeconds = Val(NzEmpty(.SubMatches(2), vbNullString))
End With

ConvTimeUTC2 = TimeSerialDbl(dblHours, dblMinutes, dblSeconds)
Expand Down