datetime.now is a function datetime.now() is the result of the function request.now is equal to datetime.now()
On Thu, Nov 7, 2013 at 12:32 PM, at <[email protected]> wrote: > > Hi, > > Is there any difference between following two statements: > #1 > from datetime import datetime > db.my_table.insert(updated=datetime.now) > > and > #2 > from datetime import datetime > db.my_table.insert(updated=datetime.now()) > > where, > db.define_table('my_table', > Field('updated', type='datetime', default=request.now, writable=False > ), > ) > > Thanks & Regards > AT > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

