[f-spot] no longer crash on dst changes
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] no longer crash on dst changes
- Date: Mon, 13 Jul 2009 10:11:25 +0000 (UTC)
commit 45fe9d3d18ea5632ec973c94642263e94e375e73
Author: Stephane Delcroix <stephane delcroix org>
Date: Mon Jul 13 12:09:29 2009 +0200
no longer crash on dst changes
this fix for bgo#588361 workaround what I think it's a bug in mono dto implementation of +=
src/Widgets/DateEdit.cs | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Widgets/DateEdit.cs b/src/Widgets/DateEdit.cs
index 96bfd6d..e46ca3c 100644
--- a/src/Widgets/DateEdit.cs
+++ b/src/Widgets/DateEdit.cs
@@ -213,7 +213,7 @@ namespace FSpot.Widgets
{
DateTimeOffset new_date;
if (DateTimeOffset.TryParseExact (date_entry.Text, "d", null, System.Globalization.DateTimeStyles.AssumeLocal | System.Globalization.DateTimeStyles.AllowWhiteSpaces, out new_date))
- DateTimeOffset += (new_date.Date - DateTimeOffset.Date);
+ DateTimeOffset = new DateTimeOffset (calendar.Date + DateTimeOffset.TimeOfDay, DateTimeOffset.Offset);
else
date_entry.ModifyBase (StateType.Normal, red);
}
@@ -245,7 +245,7 @@ namespace FSpot.Widgets
void HandleCalendarDaySelected (object sender, EventArgs e)
{
- DateTimeOffset += (calendar.Date - DateTimeOffset.Date);
+ DateTimeOffset = new DateTimeOffset (calendar.Date + DateTimeOffset.TimeOfDay, DateTimeOffset.Offset);
}
void HandleCalendarDaySelectedDoubleClick (object sender, EventArgs e)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]