Fix timezone display in history page (#479)
This commit is contained in:
parent
955ea5c014
commit
9ac5e7569b
2 changed files with 8 additions and 2 deletions
|
|
@ -23,3 +23,5 @@ export const MAX_CONVERT_PROCESS =
|
|||
|
||||
export const UNAUTHENTICATED_USER_SHARING =
|
||||
process.env.UNAUTHENTICATED_USER_SHARING?.toLowerCase() === "true" || false;
|
||||
|
||||
export const TIMEZONE = process.env.TZ || undefined;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { BaseHtml } from "../components/base";
|
|||
import { Header } from "../components/header";
|
||||
import db from "../db/db";
|
||||
import { Filename, Jobs } from "../db/types";
|
||||
import { ALLOW_UNAUTHENTICATED, HIDE_HISTORY, LANGUAGE, WEBROOT } from "../helpers/env";
|
||||
import { ALLOW_UNAUTHENTICATED, HIDE_HISTORY, LANGUAGE, TIMEZONE, WEBROOT } from "../helpers/env";
|
||||
import { userService } from "./user";
|
||||
import { EyeIcon } from "../icons/eye";
|
||||
import { DeleteIcon } from "../icons/delete";
|
||||
|
|
@ -129,7 +129,11 @@ export const history = new Elysia().use(userService).get(
|
|||
/>
|
||||
</svg>
|
||||
</td>
|
||||
<td safe>{new Date(job.date_created).toLocaleTimeString(LANGUAGE)}</td>
|
||||
<td safe>
|
||||
{new Date(job.date_created).toLocaleTimeString(LANGUAGE, {
|
||||
timeZone: TIMEZONE,
|
||||
})}
|
||||
</td>
|
||||
<td>{job.num_files}</td>
|
||||
<td class="max-sm:hidden">{job.finished_files}</td>
|
||||
<td safe>{job.status}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue