Instead of initializing a @time variable here you can use the built in created_at (or updated_at) attributes that ruby gives you when you create an object.