[eina] Better pretty printing of eina_value timeval buddies.
authorGustavo Lima Chaves <glima@profusion.mobi>
Mon, 12 Nov 2012 12:26:07 +0000 (12:26 +0000)
committerGustavo Lima Chaves <glima@profusion.mobi>
Mon, 12 Nov 2012 12:26:07 +0000 (12:26 +0000)
SVN revision: 79154

src/lib/eina/eina_value.c

index d6446cca57a555e4d07b709fefd997ab9a09a058..3e7ee3f7254d59f2a31d6c988f4b32acf4eff4d4 100644 (file)
@@ -3557,7 +3557,8 @@ _eina_value_type_timeval_convert_to(const Eina_Value_Type *type EINA_UNUSED, con
      {
         const char *other_mem;
         char buf[64];
-        snprintf(buf, sizeof(buf), "%ld.%06ld", v.tv_sec, v.tv_usec);
+        strftime
+          (buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", localtime(&(v.tv_sec)));
         other_mem = buf; /* required due &buf == buf */
         return eina_value_type_pset(convert, convert_mem, &other_mem);
      }