mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-06-27 14:16:54 +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}",
|
||||
DateFormat.yMd(locale)
|
||||
.add_jms()
|
||||
.format(gData.meta.posted),
|
||||
.format(gData.meta.posted.toLocal()),
|
||||
maxLines: 2,
|
||||
minLines: 1,
|
||||
fontSize: 12,
|
||||
|
||||
@@ -32,7 +32,7 @@ class GalleryInfoDetail extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
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)),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -58,11 +58,11 @@ class SessionCard extends StatelessWidget {
|
||||
final expiredTime =
|
||||
DateFormat.yMd(MainApp.of(context).lang.toLocale().toString())
|
||||
.add_jms()
|
||||
.format(token.expired);
|
||||
.format(token.expired.toLocal());
|
||||
final lastUsed =
|
||||
DateFormat.yMd(MainApp.of(context).lang.toLocale().toString())
|
||||
.add_jms()
|
||||
.format(token.lastUsed);
|
||||
.format(token.lastUsed.toLocal());
|
||||
return Card.outlined(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
|
||||
@@ -383,8 +383,8 @@ class _TaskPage extends State<TaskPage> {
|
||||
? Divider(indent: indent, endIndent: endIndent)
|
||||
: Container(),
|
||||
posted != null
|
||||
? _KeyValue(
|
||||
i18n.posted, DateFormat.yMd(locale).add_jms().format(posted),
|
||||
? _KeyValue(i18n.posted,
|
||||
DateFormat.yMd(locale).add_jms().format(posted.toLocal()),
|
||||
fontSize: 16)
|
||||
: Container(),
|
||||
Divider(indent: indent, endIndent: endIndent),
|
||||
|
||||
Reference in New Issue
Block a user