mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
fix: Convert timestamps to local time in date formatting across components
This commit is contained in:
@@ -127,7 +127,7 @@ class GalleryInfoDesktop extends StatelessWidget {
|
|||||||
"${i18n.posted}${i18n.colon}",
|
"${i18n.posted}${i18n.colon}",
|
||||||
DateFormat.yMd(locale)
|
DateFormat.yMd(locale)
|
||||||
.add_jms()
|
.add_jms()
|
||||||
.format(gData.meta.posted),
|
.format(gData.meta.posted.toLocal()),
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class GalleryInfoDetail extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Rate(meta.rating, fontSize: 14),
|
Rate(meta.rating, fontSize: 14),
|
||||||
Text(DateFormat.yMd(locale).add_jms().format(meta.posted),
|
Text(DateFormat.yMd(locale).add_jms().format(meta.posted.toLocal()),
|
||||||
style: TextStyle(color: cs.secondary)),
|
style: TextStyle(color: cs.secondary)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -58,11 +58,11 @@ class SessionCard extends StatelessWidget {
|
|||||||
final expiredTime =
|
final expiredTime =
|
||||||
DateFormat.yMd(MainApp.of(context).lang.toLocale().toString())
|
DateFormat.yMd(MainApp.of(context).lang.toLocale().toString())
|
||||||
.add_jms()
|
.add_jms()
|
||||||
.format(token.expired);
|
.format(token.expired.toLocal());
|
||||||
final lastUsed =
|
final lastUsed =
|
||||||
DateFormat.yMd(MainApp.of(context).lang.toLocale().toString())
|
DateFormat.yMd(MainApp.of(context).lang.toLocale().toString())
|
||||||
.add_jms()
|
.add_jms()
|
||||||
.format(token.lastUsed);
|
.format(token.lastUsed.toLocal());
|
||||||
return Card.outlined(
|
return Card.outlined(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
|||||||
@@ -383,8 +383,8 @@ class _TaskPage extends State<TaskPage> {
|
|||||||
? Divider(indent: indent, endIndent: endIndent)
|
? Divider(indent: indent, endIndent: endIndent)
|
||||||
: Container(),
|
: Container(),
|
||||||
posted != null
|
posted != null
|
||||||
? _KeyValue(
|
? _KeyValue(i18n.posted,
|
||||||
i18n.posted, DateFormat.yMd(locale).add_jms().format(posted),
|
DateFormat.yMd(locale).add_jms().format(posted.toLocal()),
|
||||||
fontSize: 16)
|
fontSize: 16)
|
||||||
: Container(),
|
: Container(),
|
||||||
Divider(indent: indent, endIndent: endIndent),
|
Divider(indent: indent, endIndent: endIndent),
|
||||||
|
|||||||
Reference in New Issue
Block a user