mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
fix: default to user timezone (#1559)
Passes the timezone of the user uploading the document/template via the UI to the server. If the user uploads a document/template via the API and doesn't set a timezone, it defaults to `Etc/UTC`.
This commit is contained in:
@ -26,6 +26,7 @@ export type CreateDocumentOptions = {
|
||||
documentDataId: string;
|
||||
formValues?: Record<string, string | number | boolean>;
|
||||
normalizePdf?: boolean;
|
||||
timezone?: string;
|
||||
requestMetadata?: RequestMetadata;
|
||||
};
|
||||
|
||||
@ -42,6 +43,7 @@ export const createDocument = async ({
|
||||
normalizePdf,
|
||||
formValues,
|
||||
requestMetadata,
|
||||
timezone,
|
||||
}: CreateDocumentOptions): Promise<TCreateDocumentResponse> => {
|
||||
const user = await prisma.user.findFirstOrThrow({
|
||||
where: {
|
||||
@ -150,6 +152,7 @@ export const createDocument = async ({
|
||||
create: {
|
||||
language: team?.teamGlobalSettings?.documentLanguage,
|
||||
typedSignatureEnabled: team?.teamGlobalSettings?.typedSignatureEnabled,
|
||||
timezone: timezone,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user