Forum: Ruby on Rails postgresql timeStamp and ruby Time.now???

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
sayoyo (Guest)
on 2007-02-08 00:28
Hi,

I have a postgresql DB table which has "timeStamp" field, I wonder if it
is a good way to store time with ruby-rails "Time.now" with a
"timeStamp" field??? or will it better to store the "Time.now" into a
"varchar" or "text"???

does anyone have an idea?

Thanks you very much

Sayoyo
Keynan P. (Guest)
on 2007-02-08 00:30
I vote timestamp if you ever want to alter it. but varchar if it is read
only
Ahmad (Guest)
on 2007-02-08 10:02
(Received via mailing list)
I use timestamp column type. Also, if you name your columns as
created_on and updated_on you don't have to populate it, Rails will do
it automatically for you.
sayoyo (Guest)
on 2007-02-08 16:59
I will definitively use timeStamp:)

Thanks you very much for the information!!!!

sayoyo


Ahmad wrote:
> I use timestamp column type. Also, if you name your columns as
> created_on and updated_on you don't have to populate it, Rails will do
> it automatically for you.
This topic is locked and can not be replied to.