Skip to content

Commit

Permalink
fix publiction date, to store timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Nov 22, 2024
1 parent 22d8063 commit 68f71f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function up(db: Kysely<any>): Promise<void> {
await db.schema
.alterTable("software_external_datas")
.addColumn("softwareVersion", "text")
.addColumn("publicationTime", "date")
.addColumn("publicationTime", "timestamptz")
.addColumn("keywords", "jsonb")
.addColumn("programmingLanguages", "jsonb")
.addColumn("applicationCategories", "jsonb")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe("pgDbApi", () => {
externalId,
keywords: ["bob", "l'éponge"],
latestVersion: {
"publicationTime": 1561507200000,
"publicationTime": 1561566581000,
"semVer": "1.0.0"
},
license: "MIT",
Expand Down
6 changes: 3 additions & 3 deletions api/src/core/adapters/fetchExternalData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe("fetches software extra data (from different providers)", () => {
websiteUrl: "https://create-react-app.dev/",
programmingLanguages: [],
softwareVersion: "5.0.1",
publicationTime: new Date("2022-04-11T22:00:00.000Z")
publicationTime: new Date("2022-04-12T00:00:00.000Z")
},
{
applicationCategories: null,
Expand All @@ -216,7 +216,7 @@ describe("fetches software extra data (from different providers)", () => {
websiteUrl: "https://vitejs.dev/",
programmingLanguages: ["JavaScript"],
softwareVersion: "5.4.10",
publicationTime: new Date("2024-10-22T22:00:00.000Z")
publicationTime: new Date("2024-10-23T00:00:00.000Z")
}
]);

Expand Down Expand Up @@ -269,7 +269,7 @@ describe("fetches software extra data (from different providers)", () => {
websiteUrl: "https://httpd.apache.org/",
programmingLanguages: ["C"],
softwareVersion: "2.5.0-alpha",
publicationTime: new Date("2017-11-07T23:00:00.000Z")
publicationTime: new Date("2017-11-08T00:00:00.000Z")
}
]);

Expand Down

0 comments on commit 68f71f8

Please sign in to comment.