Project

General

Profile

Actions

Defect #1889

closed

Template error when user's timezone isn't set

Added by Bevan Davis almost 17 years ago. Updated almost 17 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Start date:
2008-09-11
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I've just upgraded to Redmine 0.7.devel.1787 (MySQL) and I getting the error below on a number of pages.

It is only occuring for users that don't have their timezone set (which is the default).
The only way to fix the problem is to manually modify the value in the database as the error occurs on the My account page.

ActionView::TemplateError (undefined method `utc_to_local' for Wed Aug 29 07:12:47 UTC 2007:Time) on line #4 of my/_sidebar.rhtml:
1: <h3><%=l(:label_my_account)%></h3>
2: 
3: <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
4: <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
5: <% if @user.rss_token %>
6: <p><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
7: (<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)</p>

app/helpers/application_helper.rb:98:in `format_time'
app/views/my/_sidebar.rhtml:4:in `_run_erb_47app47views47my47_sidebar46rhtml'
Actions #1

Updated by Jean-Philippe Lang almost 17 years ago

  • Status changed from New to Resolved
  • Resolution set to Fixed

This problem didn't occur to me since I was not using UTC times.
It should be fixed in r1801. Can you confirm please ?

Actions #2

Updated by Bevan Davis almost 17 years ago

Jean-Philippe Lang wrote:

This problem didn't occur to me since I was not using UTC times.
It should be fixed in r1801. Can you confirm please ?

Yes looks good.
Can go to My account page and set Timezone to 'nothing', save and then browse without getting errors.
Thanks

Bevan

Actions #3

Updated by Jean-Philippe Lang almost 17 years ago

  • Category set to Accounts / authentication
  • Status changed from Resolved to Closed

Thanks for the feedback.

Actions

Also available in: Atom PDF