Fix bug where imports failed if format of modified time of secret was bogus.

This commit is contained in:
Jim Norman 2007-12-10 21:30:26 +00:00
parent 8d0875d82f
commit eda4718f3a
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Dec 10 14:22:38 MST 2007 - jnorman@novell.com
- Fix bug where imports failed if the modified time was not correct
format.
-------------------------------------------------------------------
Mon Sep 24 14:00:03 MDT 2007 - jnorman@novell.com

View File

@ -401,7 +401,14 @@ namespace sscs.lss
if (modifiedTimeNode != null)
{
//Console.WriteLine("Secret mod time:" + new DateTime(long.Parse(modifiedTimeNode.Value)));
secret.ModifiedTime = new DateTime(long.Parse(modifiedTimeNode.Value), DateTimeKind.Utc).ToLocalTime();
try
{
secret.ModifiedTime = new DateTime(long.Parse(modifiedTimeNode.Value), DateTimeKind.Utc).ToLocalTime();
}
catch
{
secret.ModifiedTime = DateTime.Now;
}
}
else
{