From ae0c21c7fe3c31fbb8c356265b71a5b5bdc886fe Mon Sep 17 00:00:00 2001 From: Chumva Date: Fri, 17 Aug 2018 13:52:15 +0300 Subject: [PATCH] improve SIMPLE_DATE_FORMAT --- .../src/net/osmand/telegram/ui/LiveNowTabFragment.kt | 2 +- .../src/net/osmand/telegram/utils/OsmandFormatter.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt index 680c98312b..f761d01f67 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/LiveNowTabFragment.kt @@ -368,7 +368,7 @@ class LiveNowTabFragment : Fragment(), TelegramListener, TelegramIncomingMessage val duration = System.currentTimeMillis() / 1000 - item.lastUpdated var formattedTime = OsmandFormatter.getFormattedDuration(app, duration) if (duration > OsmandFormatter.MIN_DURATION_FOR_DATE_FORMAT) { - formattedTime = OsmandFormatter.getFormattedDate(duration) + formattedTime = OsmandFormatter.getFormattedDate(item.lastUpdated.toLong()) description = getString(R.string.last_response) + ": $formattedTime" } else { description = getString(R.string.last_response) + ": $formattedTime " + diff --git a/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt b/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt index 80957f87e3..8782a6a5a6 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/utils/OsmandFormatter.kt @@ -24,7 +24,7 @@ object OsmandFormatter { private const val SHORT_TIME_FORMAT = "%02d:%02d" private const val SIMPLE_TIME_OF_DAY_FORMAT = "HH:mm" - private const val SIMPLE_DATE_FORMAT = "dd MMM, HH:mm:ss" + private const val SIMPLE_DATE_FORMAT = "dd MMM HH:mm:ss" private val dateFormatSymbols = DateFormatSymbols.getInstance() private val localDaysStr = getLettersStringArray(dateFormatSymbols.shortWeekdays, 2)