correct date

This commit is contained in:
German Laullon
2010-12-30 00:17:58 -08:00
parent 3f7a79c491
commit 8aa4333530
2 changed files with 10 additions and 2 deletions
+8 -2
View File
@@ -156,8 +156,14 @@
NSString *rol=[line substringToIndex:r_name_i.location];
NSString *name=[line substringWithRange:NSMakeRange(r_name_i.location,(r_email_i.location-r_name_i.location))];
NSString *email=[line substringWithRange:NSMakeRange(r_email_i.location+1,((r_email_e.location-1)-r_email_i.location))];
NSString *time=[line substringFromIndex:r_email_e.location+2];
NSArray *t=[[line substringFromIndex:r_email_e.location+2] componentsSeparatedByString:@" "];
NSDate *date=[NSDate dateWithTimeIntervalSince1970:[[t objectAtIndex:0] doubleValue]];
NSDateFormatter* theDateFormatter = [[NSDateFormatter alloc] init];
[theDateFormatter setDateStyle:NSDateFormatterMediumStyle];
[theDateFormatter setTimeStyle:NSDateFormatterMediumStyle];
NSString *dateString=[theDateFormatter stringForObjectValue:date];
if(![email isEqualToString:last_mail]){
[auths appendString:[NSString stringWithFormat:@"<div class='user %@ clearfix'>",rol]];
if([self isFeatureEnabled:@"gravatar"]){
@@ -165,7 +171,7 @@
[auths appendString:[NSString stringWithFormat:@"<img class='avatar' src='http://www.gravatar.com/avatar/%@?d=wavatar&s=30'/>",hash]];
}
[auths appendString:[NSString stringWithFormat:@"<p class='name'>%@ <span class='rol'>(%@)</span></p>",name,rol]];
[auths appendString:[NSString stringWithFormat:@"<p class='time'>%@</p></div>",time]];
[auths appendString:[NSString stringWithFormat:@"<p class='time'>%@</p></div>",dateString]];
}
last_mail=email;
}
+2
View File
@@ -229,6 +229,8 @@ a.showdiff {
#header p.time {
margin-top: 2px;
font-size: 11px;
white-space: nowrap;
}
#header p.name {