mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-25 11:22:23 +00:00
Removed useless code
This commit is contained in:
parent
19b6a571c6
commit
6109b9982e
3 changed files with 3 additions and 18 deletions
|
@ -13,21 +13,6 @@ String formatTimestampUTC(DateTime timestamp, String format) {
|
|||
return dateFormat.format(DateTime.parse(localDate));
|
||||
}
|
||||
|
||||
String formatTimestampUTCFromAPI(DateTime timestamp, String format) {
|
||||
final DateFormat dateFormat = DateFormat(format);
|
||||
final DateTime date = DateTime(
|
||||
timestamp.year,
|
||||
timestamp.month,
|
||||
timestamp.day,
|
||||
timestamp.hour,
|
||||
timestamp.minute,
|
||||
timestamp.second
|
||||
);
|
||||
final String utcDate = dateFormat.format(DateTime.parse(date.toString()));
|
||||
final String localDate = dateFormat.parse(utcDate, true).toLocal().toIso8601String();
|
||||
return dateFormat.format(DateTime.parse(localDate));
|
||||
}
|
||||
|
||||
String formatTimeOfDay(TimeOfDay timestamp, String format) {
|
||||
DateFormat f = DateFormat(format);
|
||||
return f.format(DateTime(0, 0, 0, timestamp.hour, timestamp.minute));
|
||||
|
|
|
@ -155,7 +155,7 @@ class LogDetailsScreen extends StatelessWidget {
|
|||
LogListTile(
|
||||
icon: Icons.schedule,
|
||||
title: AppLocalizations.of(context)!.time,
|
||||
subtitle: formatTimestampUTCFromAPI(log.time, 'HH:mm:ss')
|
||||
subtitle: formatTimestampUTC(log.time, 'HH:mm:ss')
|
||||
),
|
||||
SectionLabel(label: AppLocalizations.of(context)!.request),
|
||||
LogListTile(
|
||||
|
|
|
@ -123,7 +123,7 @@ class LogTile extends StatelessWidget {
|
|||
const SizedBox(width: 5),
|
||||
SizedBox(
|
||||
child: Text(
|
||||
formatTimestampUTCFromAPI(log.time, 'HH:mm:ss'),
|
||||
formatTimestampUTC(log.time, 'HH:mm:ss'),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.textColor,
|
||||
|
@ -190,7 +190,7 @@ class LogTile extends StatelessWidget {
|
|||
const SizedBox(width: 15),
|
||||
SizedBox(
|
||||
child: Text(
|
||||
formatTimestampUTCFromAPI(log.time, 'HH:mm:ss'),
|
||||
formatTimestampUTC(log.time, 'HH:mm:ss'),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).listTileTheme.textColor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue