diff --git a/ChangeLog b/ChangeLog
index f0aed25b7ea774f40e125be86526467cb5546e63..4aafc89005eb74970fa07e1d901988147d48cdb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-08-08 jeromeg
 
+Split the function to get the date and the time.
+
+2009-08-08 jeromeg
+
 Use the XDG pictures directory as the default save location.
 
 If it does not exist, use the home directory as a fallback.
diff --git a/lib/screenshooter-dialogs.c b/lib/screenshooter-dialogs.c
index 92b6d7eb97202334d4869bbedae7722afe5d504e..20aae37ef49775ea79b33fadb5decd8ab87d57b6 100644
--- a/lib/screenshooter-dialogs.c
+++ b/lib/screenshooter-dialogs.c
@@ -231,7 +231,8 @@ static gchar *generate_filename_for_uri (const gchar *uri,
   GFile *directory;
   GFile *file;
   gchar *base_name;
-  const gchar *date_hour = screenshooter_get_date_hour ();
+  const gchar *date = screenshooter_get_date ();
+  const gchar *current_time = screenshooter_get_time ();
   gint i;
 
   if (G_UNLIKELY (uri == NULL))
@@ -246,7 +247,7 @@ static gchar *generate_filename_for_uri (const gchar *uri,
   if (!horodate)
     base_name = g_strconcat (title, ".png", NULL);
   else
-    base_name = g_strconcat (title, " - ", date_hour, ".png", NULL);
+    base_name = g_strconcat (title, " - ", date, " - ", current_time, ".png", NULL);
 
   file = g_file_get_child (directory, base_name);
 
@@ -269,7 +270,7 @@ static gchar *generate_filename_for_uri (const gchar *uri,
       if (!horodate)
          base_name = g_strconcat (title, extension, NULL);
        else
-         base_name = g_strconcat (title, " - ", date_hour, extension, NULL);
+         base_name = g_strconcat (title, " - ", date, " - ", current_time, extension, NULL);
 
       file = g_file_get_child (directory, base_name);
 
diff --git a/lib/screenshooter-utils.c b/lib/screenshooter-utils.c
index 959656713c25f4dc8db8fa477782b0246ad3a68e..6e80741aec33a62035eac781f84891c1fe36cb59 100644
--- a/lib/screenshooter-utils.c
+++ b/lib/screenshooter-utils.c
@@ -280,18 +280,17 @@ void screenshooter_error (const gchar *format, ...)
   g_free (message);
 }
 
-gchar *screenshooter_get_date_hour (void)
+gchar *screenshooter_get_time (void)
 {
   time_t now = time (0);
-  struct tm *tm;
-  gchar *tmp, *result, *converted;
-  gchar **split;
+  const struct tm *tm;
+  gchar *result, *converted;
   gsize length;
   gchar buffer[512];
 
   tm = localtime (&now);
 
-  converted = g_locale_from_utf8 ("%x - %X", -1, NULL, NULL, NULL);
+  converted = g_locale_from_utf8 ("%X", -1, NULL, NULL, NULL);
   if (G_UNLIKELY (converted == NULL))
     converted = g_strdup ("");
 
@@ -303,15 +302,36 @@ gchar *screenshooter_get_date_hour (void)
       buffer[0] = '\0';
     }
 
-  tmp = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
-  split = g_strsplit (tmp, "/", 0);
-  result = g_strjoinv (NULL, split);
+  result = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
 
-  g_strfreev (split);
   g_free (converted);
-  g_free (tmp);
 
   return result;
 }
 
+gchar *screenshooter_get_date (void)
+{
+  GDate *date = g_date_new ();
+  gchar *result;
+  gchar **split;
+  gchar buffer[512];
+  gsize length;
+
+  g_date_set_time_t (date, time (NULL));
+
+  length = g_date_strftime (buffer, sizeof (buffer), "%x", date);
+
+  if (G_UNLIKELY (length == 0))
+    {
+      TRACE ("Buffer is NULL");
+      buffer[0] = '\0';
+    }
 
+  split = g_strsplit (buffer, "/", 0);
+  result = g_strjoinv (NULL, split);
+
+  g_strfreev (split);
+  g_free (date);
+
+  return result;
+}
diff --git a/lib/screenshooter-utils.h b/lib/screenshooter-utils.h
index d32933f0c82ec310165b9b83f1d3d89944fc858e..90d6e53748cea32a837273f1e16fbe044f12db56 100644
--- a/lib/screenshooter-utils.h
+++ b/lib/screenshooter-utils.h
@@ -48,7 +48,8 @@ gboolean screenshooter_is_remote_uri       (const gchar    *uri);
 gchar *rot13                               (gchar          *string);
 void screenshooter_error                   (const gchar    *format,
                                             ...);
-gchar *screenshooter_get_date_hour         (void);
+gchar *screenshooter_get_date              (void);
+gchar *screenshooter_get_time              (void);
 
 
 #endif