Commit e804cb24 authored by Jeremy Whiting's avatar Jeremy Whiting

From Patrick Ohly <patrick.ohly@intel.com>

Reading converts from date-only to local time to UTC. Writing must do
the same conversion. Conversion from UTC to local time was missing,
therefore the date may have gotten shifted by a day (depending on the
local time zone).

This commit intentionally does not cache the local time zone (like
reading does), because this is a bit ugly and the assumption is that
writing occurs a lot less often than reading.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=686693
parent 2d615f11
......@@ -13,6 +13,7 @@ Bugs fixed:
• Bug 685250 — make <test>.gdb deadlocks
• Bug 686674 — Tracker backend doesn't implement new Backend functions
• Bug 686506 — Make zeitgeist dependency optional again
• Bug 686693 — writing birthday lacks conversion from UTC
API changes:
• Add Backend.enable_persona_store and disable_persona_store.
......
......@@ -1829,12 +1829,13 @@ public class Edsf.PersonaStore : Folks.PersonaStore
if (_bday != null)
{
var bday = (!) _bday;
var bdaylocal = bday.to_local();
E.ContactDate contact_bday;
contact_bday = new E.ContactDate ();
contact_bday.year = (uint) bday.get_year ();
contact_bday.month = (uint) bday.get_month ();
contact_bday.day = (uint) bday.get_day_of_month ();
contact_bday.year = (uint) bdaylocal.get_year ();
contact_bday.month = (uint) bdaylocal.get_month ();
contact_bday.day = (uint) bdaylocal.get_day_of_month ();
_contact_bday = contact_bday;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment