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 Mon Sep 24 14:00:03 MDT 2007 - jnorman@novell.com

View File

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