Could you implement a default_time_zone config option? This would be really useful beacase you only have to set it once.
cheers, moritz Am 17.07.2008 um 16:36 schrieb Michele Beltrame:
Hello! I'm attaching a small patch which provides the ability to pass a time_zone parameter to the DateTime inflator, in this fashion: inflators => [{ type => 'DateTime', time_zone => 'Europe/Helsinki', parser => { strptime => "%Y-%m-%d %H:%M" }, }], This allows the DateTime object created from a string which does not contain time zone information to be returned in a definite time zone instead of the floating one. I find this particularly useful in my code in this way (Catalyst example): time_zone => $c->stash->{userdata}->time_zone', This allows me to have date and time the user enters automatically stored with the correct time zone, if if he/she doesn't indicate it (which happens all the time). As usual, I'll provide docs and tests is the patch gets accepted. ;) Thanks, Michele. -- Michele Beltrame http://www.cattlegrid.info/ ICQ 76660101 - MSN [EMAIL PROTECTED] < Inflator_DateTime_timezone .patch>_______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
_______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu