Merge pull request #2803 from basecamp/fix-timezone-date-display

Fix timezone handling for day timeline and card dates
This commit is contained in:
Donal McBreen
2026-04-06 09:27:49 +01:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ export function signedDifferenceInDays(fromDate, toDate) {
}
export function beginningOfDay(date) {
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()))
return new Date(date.getFullYear(), date.getMonth(), date.getDate())
}
export function secondsToDate(seconds) {
+1 -1
View File
@@ -42,7 +42,7 @@ class User::DayTimeline
end
def cache_key
ActiveSupport::Cache.expand_cache_key [ user, filter, day.to_date, events ], "day-timeline"
ActiveSupport::Cache.expand_cache_key [ user, filter, day.to_date, Time.zone.name, events ], "day-timeline"
end
private
@@ -1,4 +1,4 @@
<% cache [ day_timeline.events ] do %>
<% cache [ day_timeline.events, Time.zone.name ] do %>
<%# Template Dependency Updated: _layout.html.erb 2026-01-26 %>
<% if day_timeline.has_activity? %>
<div class="events__columns">