Skip to content

Commit

Permalink
weird timestamps fixed
Browse files Browse the repository at this point in the history
Weird timestamps occur when we add a zero instead of a blanc
  • Loading branch information
englbit authored Nov 3, 2020
1 parent 8b801a3 commit 31533e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ private static DateTime GetTimeStamp(string timestamp)
//use Windows-1252 to get correct time because dBaseConverter uses this code page for strings
var bytes = Util.DefaultEncoding.GetBytes(timestamp);
return bytes.Length == 5
? Helper.GetDT((byte)bytes[0], (byte)bytes[1], (byte)bytes[2], (byte)bytes[3], (byte)bytes[4], (byte)0)
? Helper.GetDT((byte)bytes[0], (byte)bytes[1], (byte)bytes[2], (byte)bytes[3], (byte)bytes[4], (byte)0x20)
: Helper.GetDT((byte)bytes[0], (byte)bytes[1], (byte)bytes[2], (byte)bytes[3], (byte)bytes[4], (byte)bytes[5]);
}
catch
Expand Down

0 comments on commit 31533e1

Please sign in to comment.