[symfony-users] Problem with datetime validation
I was wondering if anyone else can reproduce this error: When I enter in a form the datetime 2004-04-04 2:00, sfValidatorDate cleans it into 2004-04-04 3:00 so that the datetime saved is incorrect. I traced it back to sfValidatorDate using mktime or strtotime to change the date to timestamp and date to change the timestamp back to datetime. If I run the PHP this code on the CLI: ?php $ts = mktime(2, 0, 0, 4, 4, 2004); echo timestamp for '2004-04-04 2:00:00' is $ts\n; $dt = date('Y-m-d h:i:s', $ts); echo Date for timestamp $ts is $dt; I get the output: timestamp for '2004-04-04 2:00:00' is 1081076400 Date for timestamp 1081076400 is 2004-04-04 03:00:00 I use PHP 5.2.5 on Windows XP or server 2003 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Updating one partial in admin generator cache
I made a customization of a Doctrine admin generated list form to let the end user select which fields appear in the list view in a case where there are too many fields to show them all. The process is: 1 Add a form in the footer partial with check boxes for the fields to select 2 Handle the post in a custom action. This action places the fields array in the session and should refresh the _list_td_tabular.php partial or set a flag stating that it should be refreshed because the fields are hard coded in that template. 3 Modify the getListDisplay() method of the xxxGeneratorConfiguration class so that it gets its field list from the session if there is one. My problem is in step 2, to update the _list_td_tabular.php partial. The partial normally only gets updated if you modify the fields in the generator.yml file, but not if you modify the fields from the getListDisplay() method. The best I could find so far is to clear the whole cache in step 2, but it is quite overkill to just update one partial or one module. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---