summaryrefslogtreecommitdiff
path: root/addressbook/backends
diff options
context:
space:
mode:
authorTobias Mueller <tobiasmue@svn.gnome.org>2009-03-03 04:27:19 +0000
committerTobias Mueller <tobiasmue@src.gnome.org>2009-03-03 04:27:19 +0000
commit59b745224e0e494c15ec13a9b444ea619d639265 (patch)
tree9327bdebf5d393a2f8fab0dda9c8bf2177eff38e /addressbook/backends
parent05133f9ba4ac6ea7bc40c34b1f1d9a5b9d35d346 (diff)
downloadevolution-data-server-59b745224e0e494c15ec13a9b444ea619d639265.tar.gz
Don't assume that GTimeVal is a long and use time_t instead Patch by
2009-03-03 Tobias Mueller <tobiasmue@svn.gnome.org> * backends/vcf/e-book-backend-vcf.c (set_revision): * backends/file/e-book-backend-file.c (set_revision): Don't assume that GTimeVal is a long and use time_t instead Patch by Matthias Drochner. ** Fixes bug 569108 svn path=/trunk/; revision=10126
Diffstat (limited to 'addressbook/backends')
-rw-r--r--addressbook/backends/file/e-book-backend-file.c6
-rw-r--r--addressbook/backends/vcf/e-book-backend-vcf.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index 5323b9c07..145083b34 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -174,10 +174,10 @@ set_revision (EContact *contact)
{
char time_string[100] = {0};
const struct tm *tm = NULL;
- GTimeVal tv;
+ time_t t;
- g_get_current_time (&tv);
- tm = gmtime (&tv.tv_sec);
+ t = time(NULL);
+ tm = gmtime (&t);
if (tm)
strftime (time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm);
e_contact_set (contact, E_CONTACT_REV, time_string);
diff --git a/addressbook/backends/vcf/e-book-backend-vcf.c b/addressbook/backends/vcf/e-book-backend-vcf.c
index 9bebc1609..49fcb0287 100644
--- a/addressbook/backends/vcf/e-book-backend-vcf.c
+++ b/addressbook/backends/vcf/e-book-backend-vcf.c
@@ -218,10 +218,10 @@ set_revision (EContact *contact)
{
char time_string[100] = {0};
const struct tm *tm = NULL;
- GTimeVal tv;
+ time_t t;
- g_get_current_time (&tv);
- tm = gmtime (&tv.tv_sec);
+ t = time(NULL);
+ tm = gmtime (&t);
if (tm)
strftime (time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm);
e_contact_set (contact, E_CONTACT_REV, time_string);