Changeset 58

Show
Ignore:
Timestamp:
11/27/07 23:05:43 (12 months ago)
Author:
jweiss
Message:

always have a valid time zone

Files:
1 modified

Legend:

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

    r51 r58  
    1818  def set_timezone 
    1919    # default timezone is UTC (Edinburgh) 
    20     TzTime.zone = logged_in? ? current_user.tz : TimeZone['Edinburgh'] 
     20    TzTime.zone = logged_in? ? ( current_user.tz rescue TimeZone['Edinburgh']): TimeZone['Edinburgh'] 
    2121    yield 
    2222    TzTime.reset!