don't refuse to load databases with invalid times
This commit is contained in:
@@ -216,9 +216,16 @@ namespace keepass2android
|
||||
|
||||
private DateTime JavaTimeToCSharp(long javatime)
|
||||
{
|
||||
try
|
||||
{
|
||||
var utcTime = new DateTime(1970, 1, 1).AddMilliseconds(javatime);
|
||||
return TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
|
||||
}
|
||||
catch (ArgumentOutOfRangeException)
|
||||
{
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
|
||||
var utcTime = new DateTime(1970, 1, 1).AddMilliseconds(javatime);
|
||||
return TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user