(gtk) #1108: transmission includes several unlocalized strings

This commit is contained in:
Charles Kerr
2008-07-25 14:56:28 +00:00
parent 776b5fc63b
commit 9c0646553a
4 changed files with 13 additions and 8 deletions

View File

@@ -159,13 +159,16 @@ tr_strltime( char * buf, int seconds, size_t buflen )
return buf;
}
char *
rfc822date( time_t time )
gtr_localtime( time_t time )
{
const struct tm tm = *localtime( &time );
char buf[128];
strftime( buf, sizeof(buf), "%a, %d %b %Y %T %Z", &tm );
char buf[256], *eoln;
g_strlcpy( buf, asctime( &tm ), sizeof( buf ) );
if(( eoln = strchr( buf, '\n' )))
*eoln = '\0';
return g_locale_to_utf8( buf, -1, NULL, NULL, NULL );
}