[PR #1559] [MERGED] fix: default to user timezone #1715

Closed
opened 2026-02-26 20:30:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1559
Author: @catalinpit
Created: 12/30/2024
Status: Merged
Merged: 12/30/2024
Merged by: @Mythie

Base: mainHead: fix/default-document-timezone


📝 Commits (2)

  • 24d2e8d fix: default to user timezone
  • ae6351f chore: check in time zones array

📊 Changes

4 files changed (+11 additions, -1 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/upload-document.tsx (+5 -0)
📝 packages/lib/server-only/document/create-document.ts (+3 -0)
📝 packages/trpc/server/document-router/router.ts (+2 -1)
📝 packages/trpc/server/document-router/schema.ts (+1 -0)

📄 Description

Description

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.

Testing Performed

  • Changed my machine's timezone and uploaded a document via the UI.
    The correct timezone was set.

  • I created a template via the UI.
    The correct timezone was set.

  • I generated a document from the template.
    The correct timezone was set.

  • I created a document via the API without setting a timezone.
    The default UTC timezone was set.

  • I created a document via the API and specified a timezone.
    The correct timezone was set.

  • I changed my machine's timezone again and repeated the whole process.
    The correct timezones were set.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1559 **Author:** [@catalinpit](https://github.com/catalinpit) **Created:** 12/30/2024 **Status:** ✅ Merged **Merged:** 12/30/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `fix/default-document-timezone` --- ### 📝 Commits (2) - [`24d2e8d`](https://github.com/documenso/documenso/commit/24d2e8d3ce5fd772fbb7c00e679a2a626bffbb70) fix: default to user timezone - [`ae6351f`](https://github.com/documenso/documenso/commit/ae6351f63c65703db9a03e1b212b5585b9e72cef) chore: check in time zones array ### 📊 Changes **4 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/upload-document.tsx` (+5 -0) 📝 `packages/lib/server-only/document/create-document.ts` (+3 -0) 📝 `packages/trpc/server/document-router/router.ts` (+2 -1) 📝 `packages/trpc/server/document-router/schema.ts` (+1 -0) </details> ### 📄 Description ## Description 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`. ## Testing Performed - Changed my machine's timezone and uploaded a document via the UI. ✅ The correct timezone was set. - I created a template via the UI. ✅ The correct timezone was set. - I generated a document from the template. ✅ The correct timezone was set. - I created a document via the API without setting a timezone. ✅ The default `UTC` timezone was set. - I created a document via the API and specified a timezone. ✅ The correct timezone was set. - I changed my machine's timezone again and repeated the whole process. ✅ The correct timezones were set. ## Checklist - [x] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:30:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1715
No description provided.