Merge pull request #2803 from basecamp/fix-timezone-date-display
Fix timezone handling for day timeline and card dates
This commit is contained in:
@@ -7,7 +7,7 @@ export function signedDifferenceInDays(fromDate, toDate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function beginningOfDay(date) {
|
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) {
|
export function secondsToDate(seconds) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class User::DayTimeline
|
|||||||
end
|
end
|
||||||
|
|
||||||
def cache_key
|
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
|
end
|
||||||
|
|
||||||
private
|
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 %>
|
<%# Template Dependency Updated: _layout.html.erb 2026-01-26 %>
|
||||||
<% if day_timeline.has_activity? %>
|
<% if day_timeline.has_activity? %>
|
||||||
<div class="events__columns">
|
<div class="events__columns">
|
||||||
|
|||||||
Reference in New Issue
Block a user