rubyonrailsin

A Ruby and Rails talk

Friday, April 2, 2010


Re: [Rails] Re: Weird date/time incompatibility

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

On 2 April 2010 20:42, Dudebot <craignied@gmail.com> wrote:
>
>
> On Apr 2, 6:30 am, Colin Law <clan...@googlemail.com> wrote:
>
>> You say the html is correct in the index view so it cannot be an issue
>> passing the dates to the index view, or you would see the wrong dates
>> there.
>
> Thanks for helping with this.  What I see in the development html is ?
> date=2010-03-31+18%3A19%3A00+UTC
> and what I see in the production html is ?date=Thu+Apr
> +01+23%3A02%3A00+-0500+2010
> and I'm wondering if somehow it's choking on the date format on the
> production server...

Am I right in assuming that is what is contained in the <a href link
in the html? If so then the first thing is that they are in different
timezones. Can you confirm that you are definitely seeing the above
dates with the same version of the code. You said you had been
experimenting with setting the timezone in rails, are you sure you
have updated the production server and restarted it with the same code
as on your development system.

Do you want to see a local time there or UTC?

What have you currently got the timezone set to in environment.rb?

The second thing is that they are formatted differently. How are you
formatting it in your erb code? If you have not got explicit format
it might be worth doing so.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive