mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: bump line length to 120 (#20191)
This commit is contained in:
parent
977c9b96ba
commit
ad65e9011a
517 changed files with 4520 additions and 9514 deletions
|
|
@ -76,8 +76,7 @@ void main() {
|
|||
expect(dateTimeInUTC.timeZoneOffset, tz);
|
||||
});
|
||||
|
||||
test('Returns dateTimeOriginal in UTC from exifInfo with invalid timezone',
|
||||
() {
|
||||
test('Returns dateTimeOriginal in UTC from exifInfo with invalid timezone', () {
|
||||
final createdAt = DateTime.parse("2023-01-27T14:00:00-0500");
|
||||
final dateTimeOriginal = DateTime.parse("2022-01-27T14:00:00+0530");
|
||||
final e = makeExif(
|
||||
|
|
@ -98,13 +97,11 @@ void main() {
|
|||
final createdAt = DateTime.parse("2023-01-27T14:00:00-0500");
|
||||
final dateTimeOriginal = DateTime.parse("2022-01-27T14:00:00+0530");
|
||||
const location = "Asia/Hong_Kong";
|
||||
final e =
|
||||
makeExif(dateTimeOriginal: dateTimeOriginal, timeZone: location);
|
||||
final e = makeExif(dateTimeOriginal: dateTimeOriginal, timeZone: location);
|
||||
final a = makeAsset(id: '1', createdAt: createdAt, exifInfo: e);
|
||||
final (dt, tz) = a.getTZAdjustedTimeAndOffset();
|
||||
|
||||
final adjustedTime =
|
||||
TZDateTime.from(dateTimeOriginal.toUtc(), getLocation(location));
|
||||
final adjustedTime = TZDateTime.from(dateTimeOriginal.toUtc(), getLocation(location));
|
||||
expect(adjustedTime, dt);
|
||||
expect(adjustedTime.timeZoneOffset, tz);
|
||||
});
|
||||
|
|
@ -118,8 +115,7 @@ void main() {
|
|||
final (dt, tz) = a.getTZAdjustedTimeAndOffset();
|
||||
|
||||
final location = getLocation("Asia/Hong_Kong");
|
||||
final offsetFromLocation =
|
||||
Duration(milliseconds: location.currentTimeZone.offset);
|
||||
final offsetFromLocation = Duration(milliseconds: location.currentTimeZone.offset);
|
||||
final adjustedTime = dateTimeOriginal.toUtc().add(offsetFromLocation);
|
||||
|
||||
// Adds the offset to the actual time and returns the offset separately
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue