diff --git a/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart b/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart index 051a0ea2..acffda7b 100644 --- a/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart +++ b/frontend/mining-app/lib/presentation/pages/contribution/contribution_records_page.dart @@ -327,7 +327,7 @@ class _ContributionRecordsListPageState extends ConsumerState { Icon(Icons.access_time, size: 12, color: _grayText.withOpacity(0.7)), const SizedBox(width: 4), Text( - DateFormat('yyyy-MM-dd HH:mm:ss').format(record.createdAt), + DateFormat('yyyy-MM-dd HH:mm:ss').format(record.createdAt.toLocal()), style: TextStyle(fontSize: 11, color: _grayText.withOpacity(0.7)), ), ], diff --git a/frontend/mining-app/lib/presentation/pages/profile/planting_records_page.dart b/frontend/mining-app/lib/presentation/pages/profile/planting_records_page.dart index 5fd57f17..0cf4444c 100644 --- a/frontend/mining-app/lib/presentation/pages/profile/planting_records_page.dart +++ b/frontend/mining-app/lib/presentation/pages/profile/planting_records_page.dart @@ -268,13 +268,13 @@ class _PlantingRecordsPageState extends ConsumerState { _buildSummaryItem( '首次参与', summary.firstPlantingAt != null - ? DateFormat('MM-dd').format(summary.firstPlantingAt!) + ? DateFormat('MM-dd').format(summary.firstPlantingAt!.toLocal()) : '-', ), _buildSummaryItem( '最近参与', summary.lastPlantingAt != null - ? DateFormat('MM-dd').format(summary.lastPlantingAt!) + ? DateFormat('MM-dd').format(summary.lastPlantingAt!.toLocal()) : '-', ), ], @@ -360,8 +360,8 @@ class _PlantingRecordsPageState extends ConsumerState { const SizedBox(width: 4), Text( record.adoptionDate != null - ? DateFormat('yyyy-MM-dd HH:mm').format(record.adoptionDate!) - : DateFormat('yyyy-MM-dd HH:mm').format(record.createdAt), + ? DateFormat('yyyy-MM-dd HH:mm').format(record.adoptionDate!.toLocal()) + : DateFormat('yyyy-MM-dd HH:mm').format(record.createdAt.toLocal()), style: TextStyle(fontSize: 11, color: _grayText.withOpacity(0.7)), ), ], diff --git a/frontend/mining-app/lib/presentation/pages/profile/trading_records_page.dart b/frontend/mining-app/lib/presentation/pages/profile/trading_records_page.dart index d3f0bcdf..284371e7 100644 --- a/frontend/mining-app/lib/presentation/pages/profile/trading_records_page.dart +++ b/frontend/mining-app/lib/presentation/pages/profile/trading_records_page.dart @@ -341,7 +341,7 @@ class _TradingRecordsPageState extends ConsumerState with Si Icon(Icons.access_time, size: 11, color: _lightGray), const SizedBox(width: 4), Text( - DateFormat('MM-dd HH:mm').format(order.createdAt), + DateFormat('MM-dd HH:mm').format(order.createdAt.toLocal()), style: TextStyle(fontSize: 11, color: _lightGray), ), ], @@ -384,7 +384,7 @@ class _TradingRecordsPageState extends ConsumerState with Si ), ), Text( - DateFormat('MM-dd HH:mm').format(trade.createdAt), + DateFormat('MM-dd HH:mm').format(trade.createdAt.toLocal()), style: TextStyle(fontSize: 12, color: _lightGray), ), ],