ActiveRecord & inserting dates |
[eluser]AgentPhoenix[/eluser]
I'm not sure how you're wanting to store dates in your database. Personally, I like to use UNIX timestamps because it's a lot easier to format and you can do some timezone support if you want too. I'd definitely check out the Date Helper. From there, you can pass UNIX timestamps to other functions to get MySQL time or even human readable time. Then, like you have with your time() function, just put now() or something and it'll work. That's what I've been doing lately in my own application. |
Messages In This Thread |
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 05:02 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 05:42 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 06:31 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 06:35 AM
ActiveRecord & inserting dates - by El Forum - 07-01-2008, 06:48 AM
ActiveRecord & inserting dates - by El Forum - 07-08-2008, 07:44 PM
ActiveRecord & inserting dates - by El Forum - 07-09-2008, 12:38 PM
|