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 Fri, 2010-04-02 at 15:28 -0700, Dudebot wrote:
>
> On Apr 2, 3:12 pm, Colin Law <clan...@googlemail.com> wrote:
>
> > 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
>
> ...
> > Do you want to see a local time there or UTC?
>
> Thanks again--the difference was that I had this in the development
> config/enviroment.rb
> config.time_zone = 'UTC'
> But not in the production file. I uncommented it in the production
> environment.rb just now, and lo and behold, that part is now working.
>
> Except--I now remember I had in commented out of the production server
> as another part of the code which displays the "created at" field for
> a record was giving the wrong time. E.g. if I run date in a terminal
>
> I get Fri Apr 2 17:13:05 CDT 2010
>
> (Which is my time)
> But for the created at for this record in the database I'm getting
>
> 2010-04-02 22:13:33
>
> I don't seem to have that problem on my development machine (MacOS
> laptop). The production server is a Redhat Linux machine.
>
> Any idea how to "sync" created at and the system time on the
> production server?
>
> Again, many TIA,
> Craig
----
they actually are in sync

Fri Apr 2 17:13:05 CDT 2010 == 2010-04-02 22:13:05 (UTC) as CDT is UTC
+ 5 hours

Craig


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
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