Skip to content

Commit

Permalink
fix: use parse instead of remove parseDate
Browse files Browse the repository at this point in the history
  • Loading branch information
bensandee committed Jan 3, 2024
1 parent 5072643 commit 983f02d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scan.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Database, Image, ImageDocument } from "./database";
import { FilesystemRepository } from "./fs_repository";
import { StringArrayTag } from "exifreader";
import parseDate from "date-fns/parse";
import { parse } from "date-fns/parse";
import { Lifecycle, logger } from "./utils";
import { injectable } from "tsyringe";
import pLimit from "p-limit";
Expand Down Expand Up @@ -114,7 +114,7 @@ export class ImageRepositoryScanner implements Lifecycle {
if (!tag || tag.value.length === 0) {
return undefined;
}
return parseDate(tag.value[0], "yyyy:MM:dd HH:mm:ss", new Date());
return parse(tag.value[0], "yyyy:MM:dd HH:mm:ss", new Date());
}

private parseStringTag(tag: StringArrayTag | undefined): string | undefined {
Expand Down

0 comments on commit 983f02d

Please sign in to comment.