mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: merged timeline orderby localtime (#22371)
* chore: refactor dateFmt to truncateDate * fix: merged timeline orderby localtime --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
bea116e1b9
commit
fea5e6783c
9 changed files with 7628 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
|||
const int _maxMillisecondsSinceEpoch = 8640000000000000; // 275760-09-13
|
||||
const int _minMillisecondsSinceEpoch = -62135596800000; // 0001-01-01
|
||||
|
||||
DateTime? tryFromSecondsSinceEpoch(int? secondsSinceEpoch) {
|
||||
DateTime? tryFromSecondsSinceEpoch(int? secondsSinceEpoch, {bool isUtc = false}) {
|
||||
if (secondsSinceEpoch == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ DateTime? tryFromSecondsSinceEpoch(int? secondsSinceEpoch) {
|
|||
}
|
||||
|
||||
try {
|
||||
return DateTime.fromMillisecondsSinceEpoch(milliSeconds);
|
||||
return DateTime.fromMillisecondsSinceEpoch(milliSeconds, isUtc: isUtc);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue