[eina] Better pretty printing of eina_value timeval buddies.

SVN revision: 79154
This commit is contained in:
Gustavo Lima Chaves 2012-11-12 12:26:07 +00:00
parent 43eb9749ab
commit a4b2a48dc0
1 changed files with 2 additions and 1 deletions

View 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);
}