]> www.fi.muni.cz Git - evince.git/commitdiff
[pdf] Try to parse and format annots modified date
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 11 Jul 2010 16:49:02 +0000 (18:49 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 12 Jul 2010 17:12:01 +0000 (19:12 +0200)
backend/pdf/ev-poppler.cc

index 83bccdf568aef28548d88e16f91989af6d91ea7f..df5573bdd0892f4d3ff685acc2b79e293ca3612f 100644 (file)
@@ -2609,9 +2609,18 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot,
        }
 
        if (ev_annot) {
+               time_t utime;
+               gchar *modified;
+
                ev_annot->contents = poppler_annot_get_contents (poppler_annot);
                ev_annot->name = poppler_annot_get_name (poppler_annot);
-               ev_annot->modified = poppler_annot_get_modified (poppler_annot);
+               modified = poppler_annot_get_modified (poppler_annot);
+               if (poppler_date_parse (modified, &utime)) {
+                       ev_annot->modified = ev_document_misc_format_date (utime);
+                       g_free (modified);
+               } else {
+                       ev_annot->modified = modified;
+               }
                poppler_annot_color_to_gdk_color (poppler_annot, &ev_annot->color);
 
                if (POPPLER_IS_ANNOT_MARKUP (poppler_annot)) {