I want to store created_on and modified_on values of all tables in UTC 
format. Audit fields are added using 
db._common_fields.append(auth.signature) and  in auth.signature default 
value for created_on and modified_on is request.now, I want to change it to 
request.utcnow. So I tried following but its now working, it is still 
storing server time, not in UTC. 

auth.signature.created_on.default = request.utcnow
auth.signature.modified_on.default = request.utcnow
db._common_fields.append(auth.signature)


I am able to change default value to utc by explicitly defining it for each 
table like this

db.table_name.field_name.created_on.default =  request.utcnow
db.table_name.field_name.modified_on.default =  request.utcnow

But I don't want to repeat same thing for all tables.
So how can I override default values of modified_on and created_on with 
minimum lines of code?
My next task is to show record creation date/time according to user's 
timezone.

Thank You
- Gaurav Vichare

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to