Index: gtk/gtkfilechooserdefault.c
===================================================================
--- gtk/gtkfilechooserdefault.c	(revision 17563)
+++ gtk/gtkfilechooserdefault.c	(working copy)
@@ -8553,14 +8553,14 @@ list_mtime_data_func (GtkTreeViewColumn 
   const GtkFileInfo *info;
   GtkFileTime time_mtime;
   GDate mtime, now;
-  int days_diff;
-  char buf[256];
+  gint days_diff;
+  gchar *date_str = NULL;
   gboolean sensitive = TRUE;
 
   impl = data;
 
   info = get_list_file_info (impl, iter);
-  if (!info)
+  if (G_UNLIKELY (!info))
     {
       g_object_set (cell,
 		    "text", "",
@@ -8571,11 +8571,32 @@ list_mtime_data_func (GtkTreeViewColumn 
 
   time_mtime = gtk_file_info_get_modification_time (info);
 
-  if (time_mtime == 0)
-    strcpy (buf, _("Unknown"));
+  if (G_UNLIKELY (time_mtime == 0))
+    date_str = g_strdup (_("Unknown"));
   else
     {
+      struct tm tm_mtime;
       time_t time_now;
+      const gchar *format;
+      gchar buf[256];
+
+#ifdef HAVE_LOCALTIME_R
+      localtime_r ((time_t *) &time_mtime, &tm_mtime);
+#else
+      {
+        struct tm *ptm = localtime ((time_t *) &time_mtime);
+        
+        if (!ptm)
+          {
+            date_str = g_strdup (_("Unknown"));
+            g_warning ("ptm != NULL failed"):
+            goto done;
+          }
+        else
+          memcpy ((void *) &tm, (void *) ptm, sizeof (struct tm));
+      }
+#endif
+
       g_date_set_time_t (&mtime, time_mtime);
       time_now = time (NULL);
       g_date_set_time_t (&now, time_now);
@@ -8583,31 +8604,34 @@ list_mtime_data_func (GtkTreeViewColumn 
       days_diff = g_date_get_julian (&now) - g_date_get_julian (&mtime);
 
       if (days_diff == 0)
-	strcpy (buf, _("Today"));
+        format = _("Today at %H:%M");
       else if (days_diff == 1)
-	strcpy (buf, _("Yesterday"));
+        format = _("Yesterday at %H:%M");
       else
 	{
-	  char *format;
-
 	  if (days_diff > 1 && days_diff < 7)
 	    format = "%A"; /* Days from last week */
 	  else
 	    format = "%x"; /* Any other date */
+        }
 
-	  if (g_date_strftime (buf, sizeof (buf), format, &mtime) == 0)
-	    strcpy (buf, _("Unknown"));
-	}
+      if (strftime (buf, sizeof (buf), format, &tm_mtime) == 0)
+        date_str = g_strdup (_("Unknown"));
+      else
+        date_str = g_strdup (buf);
     }
 
+done:
   if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
       impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
     sensitive = gtk_file_info_get_is_folder (info);
 
   g_object_set (cell,
-		"text", buf,
+		"text", date_str,
 		"sensitive", sensitive,
 		NULL);
+
+  g_free (date_str);
 }
 
 GtkWidget *
@@ -8630,8 +8654,8 @@ static void
 location_popup_handler (GtkFileChooserDefault *impl,
 			const gchar           *path)
 {
-  if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
-      || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
+  if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
+      impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
     {
       LocationMode new_mode;
 
Index: configure.in
===================================================================
--- configure.in	(revision 17563)
+++ configure.in	(working copy)
@@ -397,6 +397,7 @@ fi
 AC_SUBST(REBUILD)
 
 AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
+AC_CHECK_FUNCS(localtime_r)
 
 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17563)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2007-03-26  Emmanuele Bassi  <ebassi@gnome.org>
+
+	* gtk/gtkfilechooserdefault.c (list_mtime_data_func): Show
+	the time of the last change in the file chooser. (#324543)
+
+	* configure.in: Check for localtime_r.
+
 2007-03-24  Kristian Rietveld  <kris@gtk.org>
 
 	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
