HiI've got couple of problems with using date/datetime/timestamp/epoch columns.
MySQL database is set to use time_zone = SYSTEM, which is BST $ date Thu Aug 9 09:58:59 BST 2007$ perl -MDateTime -le 'print DateTime->now(time_zone => "local")->time_zone->name'
Europe/LondonWhat 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. Note that DateTime objects send to Rose could be in various time zones (floating / UTC / local).
And when reading it back by ->load() it should give result in the column type_zone (as specified in column setup).
So my question is: what would be the correct setup to get that scenario?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 way time would be moved forward or back multiple times and in database incorrect values will be stored.
How to replicate it? Create a table with more then one DateTime column and try to store the same DateTime object for each of them. How to get rid of it? I'm currently ->clone DateTime object before passing it to Rose.
For those interested in playing with DateTime columns please see attached file.
Cheers, Alex PS. English is not my first language, so forgive me any mistakes. -- Alex Burzyński -- Perl Developer Product Development * Pipex Hosting [EMAIL PROTECTED] This mail is subject to this disclaimer: http://www.pipex.net/disclaimer.html
rose_date.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------- 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