On 8/9/07 6:48 AM, Alex Burzyński wrote: > What I'd like to get is when setting value of a date/* columns get it > stored in database server time_zone - so queries in mysql returns what > human reader would expect.
You can do this by setting server_time_zone() on the db object: http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/msg00804.ht ml > BTW during my research I've found probably unwanted feature in a way Rose > handles DateTime columns. If you use the same DateTime object more then once > with the same Rose object (during inserting or updating) Rose will use ref to > that object and "set_time_zone" would be called for each column. That's definitely a "wanted" feature. If the date/time methods copied their arguments, there'd be some overhead associated with that, and that overhead would be unavoidable. OTOH, if the arguments are accepted as references, it's trivial for the user to explicitly add copying by calling DateTime's clone() method: $o->some_date($dt->clone); In the current setup, both needs can be satisfied. If a copy was always made, only one scenario would be supported. -Jhn ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object