Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

Commit

Permalink
Fix getDate and getType ( Richard Régul )
Browse files Browse the repository at this point in the history
  • Loading branch information
borisz committed Feb 5, 2010
1 parent 73d18cc commit 76cf9dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
@@ -1,3 +1,4 @@
- Fix getDate and getType ( Richard Régul )
1.12 Aug 18th, 2009
- Sync RegionName.cs with more recent FIPS codes ( 20090723 ). ( Boris Zentner )
- Guard most functions in lookupService by either lock or [MethodImpl(MethodImplOptions.Synchronized)] ( Kfir Harel )
Expand Down
4 changes: 2 additions & 2 deletions DatabaseInfo.cs
Expand Up @@ -55,7 +55,7 @@ public class DatabaseInfo {
// Get the type code from the database info string and then
// subtract 105 from the value to preserve compatability with
// databases from April 2003 and earlier.
return Convert.ToInt32(info.Substring(4, 7)) - 105;
return Convert.ToInt32(info.Substring(4, 3)) - 105;
}
}

Expand All @@ -76,7 +76,7 @@ public class DatabaseInfo {
public DateTime getDate() {
for (int i=0; i<info.Length-9; i++) {
if (Char.IsWhiteSpace(info[i]) == true) {
String dateString = info.Substring(i+1, i+9);
String dateString = info.Substring(i+1, 8);
try {
//synchronized (formatter) {
return DateTime.ParseExact(dateString,"yyyyMMdd",null);
Expand Down

0 comments on commit 76cf9dd

Please sign in to comment.