Skip to content

Conversation

@karrui
Copy link
Collaborator

@karrui karrui commented Nov 13, 2024

TL;DR

Updated date-fns dependencies and migrated timezone handling to use the new @date-fns/tz package.

What changed?

  • Upgraded date-fns from v3.6.0 to v4.1.0
  • Replaced date-fns-tz with @date-fns/tz v1.2.0
  • Updated email router to use TZDate from @date-fns/tz for timezone handling
  • Modified date formatting in the email template to use the new format function

How to test?

  1. Request an email OTP
  2. Verify the received email shows the correct expiration time in Singapore timezone
  3. Confirm the OTP functionality works as expected
  4. Verify the date format matches "dd MMM yyyy, h:mmaaa" pattern

Why make this change?

The update to date-fns v4 and migration to @date-fns/tz provides better timezone handling and maintains compatibility with the latest date manipulation libraries. This change ensures consistent date formatting across the application while using modern, supported packages.

@vercel
Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
starter-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 8:21am

Copy link
Collaborator Author

karrui commented Nov 13, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @karrui and the rest of your teammates on Graphite Graphite

@karrui karrui changed the title feat: update date-fns, use @date-fns/tz feat: update date-fns to v4, migrate to @date-fns/tz Nov 13, 2024
@karrui karrui marked this pull request as ready for review November 13, 2024 08:19
@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Nov 13, 2024

Datadog Report

Branch report: 11-13-feat_update_date-fns_use_date-fns_tz
Commit report: 518716f
Test service: starter-kit

✅ 0 Failed, 11 Passed, 0 Skipped, 16.11s Total Time
➡️ Test Sessions change in coverage: 1 no change

@karrui karrui merged commit d733167 into main Nov 13, 2024
13 checks passed
@karrui karrui deleted the 11-13-feat_update_date-fns_use_date-fns_tz branch November 13, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant