Skip to content

Conversation

@codujin
Copy link
Collaborator

@codujin codujin commented Dec 29, 2025

  • Add migration 004_DateToTimestamp.sql to change order_date from DATE to TIMESTAMPTZ
  • Configure Npgsql to handle timestamps as UTC (disable legacy behavior)
  • Update ReplenishmentOrder model and DTO from DateOnly to DateTime
  • Modify repositories to explicitly mark DateTime values as UTC (DateTimeKind.Utc)
  • Update frontend date formatters to display timestamps in user's local timezone
  • Add timezone abbreviation display (e.g., GMT+2, EST, PST) for clarity
  • Configure ASP.NET Core JSON serializer for proper UTC datetime serialization

Fixes timezone offset issues where timestamps stored in UTC were incorrectly displayed in the frontend. PostgreSQL TIMESTAMPTZ now stores values in UTC internally, and JavaScript Date objects correctly interpret and convert to the user's local timezone.

Backend: backend/Migrations/, backend/Models/, backend/DTOs/,
backend/Repositories/, backend/Program.cs
Frontend: frontend/app/user/orders/, frontend/app/admin/home/,
frontend/app/admin/publisher-orders/

- Add migration 004_DateToTimestamp.sql to change order_date from DATE to TIMESTAMPTZ
- Configure Npgsql to handle timestamps as UTC (disable legacy behavior)
- Update ReplenishmentOrder model and DTO from DateOnly to DateTime
- Modify repositories to explicitly mark DateTime values as UTC (DateTimeKind.Utc)
- Update frontend date formatters to display timestamps in user's local timezone
- Add timezone abbreviation display (e.g., GMT+2, EST, PST) for clarity
- Configure ASP.NET Core JSON serializer for proper UTC datetime serialization

Fixes timezone offset issues where timestamps stored in UTC were incorrectly
displayed in the frontend. PostgreSQL TIMESTAMPTZ now stores values in UTC
internally, and JavaScript Date objects correctly interpret and convert to
the user's local timezone.

Backend: backend/Migrations/, backend/Models/, backend/DTOs/,
         backend/Repositories/, backend/Program.cs
Frontend: frontend/app/user/orders/, frontend/app/admin/home/,
          frontend/app/admin/publisher-orders/
@codujin codujin requested a review from AhmWael December 29, 2025 03:20
@codujin codujin added the enhancement New feature or request label Dec 29, 2025
@codujin codujin requested a review from hamzawy-w December 29, 2025 03:23
@hamzawy-w
Copy link
Collaborator

Approved.

Copy link
Collaborator

@hamzawy-w hamzawy-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@codujin codujin merged commit 6ba00af into main Dec 29, 2025
2 checks passed
@github-actions
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants