mirror of
https://github.com/transmission/transmission
synced 2025-03-03 18:25:35 +00:00
(trunk) #3698 "creation date of magnet links are set before the epoch." -- fixed.
This commit is contained in:
parent
130b52ce93
commit
ffe54a20ed
3 changed files with 11 additions and 2 deletions
|
@ -605,6 +605,10 @@ get_short_date_string( time_t t )
|
|||
{
|
||||
char buf[64];
|
||||
struct tm tm;
|
||||
|
||||
if( !t )
|
||||
return g_strdup( _( "N/A" ) );
|
||||
|
||||
tr_localtime_r( &t, &tm );
|
||||
strftime( buf, sizeof( buf ), "%d %b %Y", &tm );
|
||||
return g_locale_to_utf8( buf, -1, NULL, NULL, NULL );
|
||||
|
|
|
@ -619,10 +619,12 @@ Details :: refresh( )
|
|||
}
|
||||
if( mixed_creator && mixed_date )
|
||||
string = mixed;
|
||||
else if( mixed_date )
|
||||
else if( mixed_date && !creator.isEmpty())
|
||||
string = tr( "Created by %1" ).arg( creator );
|
||||
else if( mixed_creator || creator.isEmpty( ) )
|
||||
else if( mixed_creator && !date.isEmpty())
|
||||
string = tr( "Created on %1" ).arg( date );
|
||||
else if( creator.isEmpty() && date.isEmpty())
|
||||
string = tr( "N/A" );
|
||||
else
|
||||
string = tr( "Created by %1 on %2" ).arg( creator ).arg( date );
|
||||
}
|
||||
|
|
|
@ -210,6 +210,9 @@ Transmission.fmt = (function()
|
|||
|
||||
timestamp: function( seconds )
|
||||
{
|
||||
if( !seconds )
|
||||
return 'N/A';
|
||||
|
||||
var myDate = new Date(seconds*1000);
|
||||
var now = new Date();
|
||||
|
||||
|
|
Loading…
Reference in a new issue