banshee r3450 - in trunk/banshee: . src/Libraries/Hyena/Hyena
- From: gburt svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3450 - in trunk/banshee: . src/Libraries/Hyena/Hyena
- Date: Thu, 13 Mar 2008 20:39:53 +0000 (GMT)
Author: gburt
Date: Thu Mar 13 20:39:53 2008
New Revision: 3450
URL: http://svn.gnome.org/viewvc/banshee?rev=3450&view=rev
Log:
2008-03-13  Gabriel Burt  <gabriel burt gmail com>
	* src/Libraries/Hyena/Hyena/DateTimeUtil.cs: Super ugly hack to work
	around ArguemtnOutOfRangeException thrown by DateTime parser.
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Libraries/Hyena/Hyena/DateTimeUtil.cs
Modified: trunk/banshee/src/Libraries/Hyena/Hyena/DateTimeUtil.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena/Hyena/DateTimeUtil.cs	(original)
+++ trunk/banshee/src/Libraries/Hyena/Hyena/DateTimeUtil.cs	Thu Mar 13 20:39:53 2008
@@ -44,9 +44,10 @@
             return ToTimeT (time);
         }
 
+        private static long super_ugly_min_hack = -15768000000; // 500 yrs before epoch...ewww
         public static DateTime FromTimeT (long time)
         {
-            return LocalUnixEpoch.AddSeconds (time);
+            return (time <= super_ugly_min_hack) ? DateTime.MinValue : LocalUnixEpoch.AddSeconds (time);
         }
 
         public static long ToTimeT (DateTime time)
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]