Skip to content

Commit

Permalink
Fix gelbooru returning wrong creation date
Browse files Browse the repository at this point in the history
  • Loading branch information
respektive committed Jul 14, 2022
1 parent 5a9dd85 commit 5eb7502
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/structures/Post.ts
Expand Up @@ -262,6 +262,8 @@ export default class Post {
)
} else if (typeof data.created_at === 'number') {
this.createdAt = new Date(data.created_at * 1000)
} else if (typeof data.created_at === 'string') {
this.createdAt = new Date(data.created_at)
} else if (typeof data.change === 'number') {
this.createdAt = new Date(data.change * 1000)
} else {
Expand Down

0 comments on commit 5eb7502

Please sign in to comment.