Workaround for illegal unix timestamp in dump

main
Inga 🏳‍🌈 15 years ago
parent 21dd350028
commit e622016636
  1. 11
      ImportConsole/ShallerDBProcessor.cs

@ -163,7 +163,16 @@ namespace FLocal.ImportConsole {
} else { } else {
int localMain = int.Parse(data["Local_Main"]); int localMain = int.Parse(data["Local_Main"]);
int main = int.Parse(data["Main"]); int main = int.Parse(data["Main"]);
DateTime date = UNIX.AddSeconds(int.Parse(data["UnixTime"])).ToLocalTime(); int UnixTime;
try {
UnixTime = int.Parse(data["UnixTime"]);
} catch(OverflowException) {
UnixTime = 1000*1000*1000;
}
if(UnixTime <= 0) {
UnixTime = 1000*1000*1000;
}
DateTime date = UNIX.AddSeconds(UnixTime).ToLocalTime();
User user; User user;
string username = data["Username"]; string username = data["Username"];
try { try {

Loading…
Cancel
Save