Changeset 115

Show
Ignore:
Timestamp:
06/13/08 23:17:03 (5 months ago)
Author:
jweiss
Message:

more TimeZone? changes

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/application.rb

    r113 r115  
    1919   
    2020  def set_timezone 
    21     # default timezone is UTC (Edinburgh) 
    22     Time.zone = logged_in? ? ( current_user.tz rescue TimeZone['Edinburgh']): TimeZone['Edinburgh'] 
     21    # default timezone is UTC 
     22    Time.zone = logged_in? ? ( current_user.time_zone rescue 'UTC'): 'UTC' 
    2323    yield 
    24     Time.zone = TimeZone['Edinburgh'] 
     24    Time.zone = 'UTC' 
    2525  end 
    2626   
  • trunk/app/views/deployments/_status.html.erb

    r80 r115  
    2727        <p> 
    2828          <b>Started:</b> 
    29           <%=h @deployment.created_at.to_s(:log) %> 
     29          <%=h @deployment.created_at.to_s(:log) %> (<%=h current_user.time_zone rescue 'UTC' %>) 
    3030        </p> 
    3131  <p> 
    3232          <b>Completed:</b> 
    33           <%=h @deployment.completed_at.to_s(:log) rescue nil %> 
     33          <%=h "#{@deployment.completed_at.to_s(:log)} (#{current_user.time_zone})" rescue nil %> 
    3434        </p> 
    3535        <% if @deployment.completed? %> 
  • trunk/app/views/users/_form.html.erb

    r73 r115  
    2222<p> 
    2323  <b>Timezone</b><br /> 
    24   <%= time_zone_select 'user', 'time_zone', TZInfo::Timezone.all.sort, {:model => TZInfo::Timezone},{:style => "width:330px;"} %> 
     24  <%= time_zone_select 'user', :time_zone, TimeZone.all, {},{:style => "width:330px;"} %> 
    2525</p> 
    2626 
  • trunk/app/views/users/show.html.erb

    r73 r115  
    3131       
    3232                        <p> 
    33                           <b>Timezone:</b> <%=h @user.tz.to_s %> 
     33                          <b>Timezone:</b> <%=h @user.time_zone.to_s %> 
    3434                        </p> 
    3535                        <p> 
  • trunk/config/environment.rb

    r113 r115  
    100100# set default time_zone to UTC 
    101101ENV['TZ'] = 'UTC' 
    102 Time.zone = TimeZone['Edinburgh'] 
     102Time.zone = 'UTC'