On Wed, Oct 13, 2010 at 10:56 PM, andrei <[email protected]> wrote:
> What I'm doing now is using dateutil module to convert value from
> server's timezone to local time zone in my app on retrieval, but i'd
> rather let MySQL manage this conversions.

I don't know if it would work, but I've spooted this in web.db.DB:

    def _connect(self, keywords):
        return self.db_module.connect(**keywords)

This is where the connection is made. You could override this in one
of two ways. So, what you need to do is subclass web.db.MySQLDB class,
and override the _connect method in your subclass. In the new _connect
method, you'd execute ``SET TIME_ZONE`` before returining the
connection object.



-- 
Branko Vukelić

[email protected]
[email protected]

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to