Skip to content

Commit f94b88e

Browse files
committed
Update VBA-UTC to v1.0.5
1 parent 0c48829 commit f94b88e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

JsonConverter.bas

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Option Explicit
5454
Private Declare PtrSafe Function utc_popen Lib "libc.dylib" Alias "popen" _
5555
(ByVal utc_Command As String, ByVal utc_Mode As String) As LongPtr
5656
Private Declare PtrSafe Function utc_pclose Lib "libc.dylib" Alias "pclose" _
57-
(ByVal utc_File As Long) As LongPtr
57+
(ByVal utc_File As LongPtr) As LongPtr
5858
Private Declare PtrSafe Function utc_fread Lib "libc.dylib" Alias "fread" _
5959
(ByVal utc_Buffer As String, ByVal utc_Size As LongPtr, ByVal utc_Number As LongPtr, ByVal utc_File As LongPtr) As LongPtr
6060
Private Declare PtrSafe Function utc_feof Lib "libc.dylib" Alias "feof" _
@@ -908,7 +908,7 @@ Private Function json_UnsignedAdd(json_Start As Long, json_Increment As Long) As
908908
End Function
909909

910910
''
911-
' VBA-UTC v1.0.3
911+
' VBA-UTC v1.0.5
912912
' (c) Tim Hall - https://github.com/VBA-tools/VBA-UtcConverter
913913
'
914914
' UTC/ISO 8601 Converter for VBA
@@ -1056,7 +1056,7 @@ Public Function ParseIso(utc_IsoString As String) As Date
10561056
ParseIso = ParseUtc(ParseIso)
10571057

10581058
If utc_HasOffset Then
1059-
ParseIso = ParseIso + utc_Offset
1059+
ParseIso = ParseIso - utc_Offset
10601060
End If
10611061
End If
10621062

@@ -1140,15 +1140,15 @@ Private Function utc_ExecuteInShell(utc_ShellCommand As String) As utc_ShellResu
11401140

11411141
Do While utc_feof(utc_File) = 0
11421142
utc_Chunk = VBA.Space$(50)
1143-
utc_Read = utc_fread(utc_Chunk, 1, Len(utc_Chunk) - 1, utc_File)
1143+
utc_Read = CLng(utc_fread(utc_Chunk, 1, Len(utc_Chunk) - 1, utc_File))
11441144
If utc_Read > 0 Then
1145-
utc_Chunk = VBA.Left$(utc_Chunk, utc_Read)
1145+
utc_Chunk = VBA.Left$(utc_Chunk, CLng(utc_Read))
11461146
utc_ExecuteInShell.utc_Output = utc_ExecuteInShell.utc_Output & utc_Chunk
11471147
End If
11481148
Loop
11491149

11501150
utc_ErrorHandling:
1151-
utc_ExecuteInShell.utc_ExitCode = utc_pclose(utc_File)
1151+
utc_ExecuteInShell.utc_ExitCode = CLng(utc_pclose(utc_File))
11521152
End Function
11531153

11541154
#Else

0 commit comments

Comments
 (0)