Skip to content

Commit

Permalink
Fix timezones
Browse files Browse the repository at this point in the history
* Solve timezone issue

* Fix ugly time formats
  • Loading branch information
bbucsy authored Sep 4, 2021
1 parent 94c3c42 commit bd2968f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/views/events/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<% @events.each do |event| %>
<tr>
<td><%= link_to event.name, event %></td>
<td><%= event.start %></td>
<td><%= event.end %>
<td><%= event.event_type ? event.deadline : "-" %></td>
<td><%= l event.start %></td>
<td><%= l event.end %>
<td><%= event.event_type ? l(event.deadline) : "-" %></td>
<td>
<% if event.event_type %>
<%= link_to event.event_type.name, event.event_type %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/posts/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<% @posts.each do |post| %>
<tr>
<td><%= link_to post.title, post %></td>
<td><%= post.created_at %></td>
<td><%= l post.created_at %></td>
<td>
<% if post.image.attached? %>
van
Expand Down
2 changes: 1 addition & 1 deletion app/views/rents/closed.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<% @rents.each do |rent| %>
<tr>
<td><%= rent.user.name %></td>
<td><%= rent.created_at %></td>
<td><%= l rent.created_at %></td>
<td><%= l rent.start_date %> - <%= l rent.end_date %></td>
<td><%= rent.compact_order %></td>
<td>
Expand Down
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.0

config.time_zone = 'Europe/Budapest'

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
Expand Down

0 comments on commit bd2968f

Please sign in to comment.