feat(app): all album date displays date-only — formatAlbumDateTime drops HH:mm

相册列表卡/详情信息/分享页 meta/照片查看器日期一律纯日期(y/M/d)。
全量测试断言同步;397/397 全绿。

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-24 16:20:47 +08:00
parent 07761b1b26
commit cf490c7892
8 changed files with 11 additions and 20 deletions
@@ -13,7 +13,7 @@ void main() {
test('UTC 瞬间按 Asia/Shanghai 展示(intl 格式化)', () {
final utc = DateTime.utc(2026, 9, 18, 6, 30);
expect(formatAlbumDateTime(utc, 'Asia/Shanghai', 'en'), '2026/9/18 14:30');
expect(formatAlbumDateTime(utc, 'Asia/Shanghai', 'en'), '2026/9/18');
});
test('非 Asia/Shanghai 时区亦按各自墙钟展示(America/New_York)', () {
@@ -21,13 +21,13 @@ void main() {
// 9 月为纽约夏令时 UTC-4 → 02:30。
expect(
formatAlbumDateTime(utc, 'America/New_York', 'en'),
'2026/9/18 02:30',
'2026/9/18',
);
});
test('无效时区回退 UTC 展示', () {
final utc = DateTime.utc(2026, 9, 18, 6, 30);
expect(formatAlbumDateTime(utc, 'Mars/Olympus', 'en'), '2026/9/18 06:30');
expect(formatAlbumDateTime(utc, 'Mars/Olympus', 'en'), '2026/9/18');
});
test('墙钟 → UTC 往返一致(表单提交与回显)', () {