[folks] Fix birthday calculation in eds tests.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Fix birthday calculation in eds tests.
- Date: Wed, 7 Sep 2011 19:02:43 +0000 (UTC)
commit 913528c050823bf079c5e5eceb21b0895cf96012
Author: Travis Reitter <travis reitter collabora co uk>
Date: Wed Sep 7 11:37:12 2011 -0700
Fix birthday calculation in eds tests.
It's not nice to discriminate against people born outside of UTC.
tests/eds/add-persona.vala | 2 +-
tests/eds/set-birthday.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index 658aaa1..4d41b79 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -427,7 +427,7 @@ public class AddPersonaTests : Folks.TestCase
if (i.birthday != null)
{
- DateTime dobj = new DateTime.utc (1980, 1, 1, 0, 0, 0.0);
+ DateTime dobj = new DateTime.local (1980, 1, 1, 0, 0, 0.0).to_utc ();
if (i.birthday.equal (dobj))
this._properties_found.replace ("birthday", true);
}
diff --git a/tests/eds/set-birthday.vala b/tests/eds/set-birthday.vala
index a618c49..1ef4d89 100644
--- a/tests/eds/set-birthday.vala
+++ b/tests/eds/set-birthday.vala
@@ -135,7 +135,7 @@ public class SetBirthdayTests : Folks.TestCase
{
Folks.Individual i = (Folks.Individual) individual_obj;
var name = (Folks.NameDetails) i;
- var dobj = new DateTime.utc (1980, 1, 1, 0, 0, 0.0);
+ var dobj = new DateTime.local (1980, 1, 1, 0, 0, 0.0).to_utc ();
if (name.full_name == "John McClane" &&
i.birthday != null &&
i.birthday.equal (dobj))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]