MDL-12893 fixed sorting of date fields in pg - credit goes to David; merged from MOODLE_19_STABLE
MDL-12893 fixed sorting of date fields in pg - credit goes to David; merged from MOODLE_19_STABLE

dilawar/moodle