Skip to content

Commit 2ae1386

Browse files
committed
Fix notification history timestamps to display in local timezone with timezone indicator
1 parent ae80a4e commit 2ae1386

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Enhanced logging for better troubleshooting of time filter issues
2424
- Fixed notification history timestamps to match the timezone shown on the dashboard:
2525
- Updated date formatting in NotificationHistory component to use consistent formatting options
26+
- Added explicit timezone display to make the local timezone clear to users
2627
- Ensured consistent date display format across the application
2728

2829
### Improved

client/src/components/notifications/NotificationHistory.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,16 @@ const NotificationHistory = () => {
4747

4848
// Helper function to format date
4949
const formatDate = (dateString) => {
50+
// Parse the UTC date string and convert to local timezone
5051
const date = new Date(dateString);
52+
53+
// Format the date in the local timezone
5154
return date.toLocaleString([], {
5255
month: 'short',
5356
day: 'numeric',
5457
hour: '2-digit',
55-
minute: '2-digit'
58+
minute: '2-digit',
59+
timeZoneName: 'short' // Add timezone name to make it clear
5660
});
5761
};
5862

0 commit comments

Comments
 (0)