When e-mails are imported, the date/time value is offset and saved as the UTC time instead of local time. This only happens when the date/time is pulled in from the e-mail. When the date/time cannot be determined, the current date/time is generated, but is generated in the local time zone, not UTC. So the behavior is not consistent. Reproducible: Always Steps to Reproduce: 1. Send an e-mail to sync account 2. Run xtconnect-trojita 3. Observe that the date/time value stored is offset. Actual Results: Our timezone: US Pacific Date/time of e-mail is 5:45 PM US Pacific Date/time of e-mail as displayed in trojita is 3:51 PM US Pacific Date/time of e-mail as stored in psql database is 10:51 US Pacific Expected Results: Our timezone: US Pacific Date/time of e-mail is 5:45 PM US Pacific Date/time of e-mail as displayed in trojita is 3:51 PM US Pacific Date/time of e-mail as stored in psql database is 3:51 PM US Pacific Convert the time from UTC to local time.
Always double check before submitting ... The date/time values I specified were incorrect. Steps to Reproduce: 1. Send an e-mail to sync account 2. Run xtconnect-trojita 3. Observe that the date/time value stored is offset. Actual Results: Our timezone: US Pacific Date/time of e-mail is 3:51 PM US Pacific Date/time of e-mail as displayed in trojita e-mail client is 3:51 PM US Pacific Date/time of e-mail as stored in psql database is 10:51 US Pacific Expected Results: Our timezone: US Pacific Date/time of e-mail is 3:51 PM US Pacific Date/time of e-mail as displayed in trojita e-mail client is 3:51 PM US Pacific Date/time of e-mail as stored in psql database is 3:51 PM US Pacific
Git commit f97dfc26a5b078faecec59b652e0cca275be2de1 by Daniel Watson. Committed on 06/06/2013 at 02:11. Pushed by jkt into branch 'master'. XtConnect - Use QDateTime consistently as UTC Modify SQL to use ISO date string to specify that the time is UTC. REVIEW: 110846 M +1 -1 src/XtConnect/MailSynchronizer.cpp M +3 -1 src/XtConnect/SqlStorage.cpp http://commits.kde.org/trojita/f97dfc26a5b078faecec59b652e0cca275be2de1