Re: [Rails] Re: updated_at not today?

2014-06-29 Thread Colin Law
On 29 June 2014 14:27, Fresh Mix wrote: > if @post.updated_at.strftime("%d-%m-%Y") != > Time.now.strftime("%d-%m-%Y") > > Or is there better way? Those give you the dates in UTC, which may not be the same as the local timezone date. Colin -- You received this message because you are subscribed

[Rails] Re: updated_at not today?

2014-06-29 Thread Fresh Mix
if @post.updated_at.strftime("%d-%m-%Y") != Time.now.strftime("%d-%m-%Y") Or is there better way? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiv

Re: [Rails] Re: updated_at not today?

2014-06-29 Thread Robby O'Connor
This is basic ruby... --Rob Sent from my phone...excuse any typos please! On Jun 29, 2014 9:14 AM, "Fresh Mix" wrote: > Colin Law wrote in post #1151057: > > > The first question is what do you mean by today? Note in particular > > that your date may not be the same as mine if we are in differen

[Rails] Re: updated_at not today?

2014-06-29 Thread Fresh Mix
Colin Law wrote in post #1151057: > The first question is what do you mean by today? Note in particular > that your date may not be the same as mine if we are in different > timezones. Same year, same month and same date. And I think that all of my visitors are in the same time zone and it is