On 12/11/2007, John Sheahan <[EMAIL PROTECTED]> wrote: > Hi TZ users,
Hi John, Your message didn't make it to the list because you are not a member. You can subscribe at the list information page: http://rubyforge.org/mailman/listinfo/tzinfo-users > I just installed the tz gem and am trying to follow the example on > http://tzinfo.rubyforge.org/doc/ > > I put the following in my controller at the top (not under any def) > > require 'tzinfo' > > I then put the following under one of my definitions in my controller > for the page I want the time to be displayed on: > > tz = TZInfo::Timezone.get('America/New_York') > @local = tz.utc_to_local(Time.utc(2005,8,29,15,35,0)) > > I was trying to call this in my view with this statement which doesn't work: > > <td><%=@ local %></td> > > I'm obviously calling this incorrectly, would you have any suggestions? Everything looks ok apart from the bit where you are trying to output local. There shouldn't be a space between the @ and the variable name: <td><[EMAIL PROTECTED] %></td> If you are still having problems, please post some more details of the error you are getting and I'll take a look. Regards, Phil -- Phil Ross http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby _______________________________________________ TZInfo-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/tzinfo-users
