Skip to content
Snippets Groups Projects
Commit af6d5e20 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk
Browse files

UI: fix interaction time


Use system locale to correctly display interactions time in different
languages.

Change-Id: Ib70c3be46ccef36a001c50b99e058aa5d12f0837
Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent e184f2e3
No related branches found
No related tags found
No related merge requests found
......@@ -668,6 +668,7 @@ typedef NS_ENUM(NSInteger, MessageSequencing) {
-(NSString *)timeForMessage:(NSDate*) msgTime {
NSDate *today = [NSDate date];
NSDateFormatter *dateFormatter=[[NSDateFormatter alloc] init];
[dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:[[NSLocale currentLocale] localeIdentifier]]];
if ([[NSCalendar currentCalendar] compareDate:today
toDate:msgTime
toUnitGranularity:NSCalendarUnitYear]!= NSOrderedSame) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment