# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/lib/simpletest/testmoodlelib.php
--- moodle/lib/simpletest/testmoodlelib.php Base (1.9.2.8)
+++ moodle/lib/simpletest/testmoodlelib.php Locally Modified (Based On 1.9.2.8)
@@ -262,6 +262,39 @@
             shorten_text($text, 8));
     }
 
+    function test_usergetdate() {
+        $ts = 1261540267; //the time this function was created
+
+        $arr = usergetdate($ts,1);
+        $arr = array_values($arr);
+        
+        list($seconds,$minutes,$hours,$mday,$wday,$mon,$year,$yday,$weekday,$month) = $arr;
+        $this->assertEqual($seconds,7);
+        $this->assertEqual($minutes,51);
+        $this->assertEqual($hours,4);
+        $this->assertEqual($mday,23);
+        $this->assertEqual($wday,3);
+        $this->assertEqual($mon,12);
+        $this->assertEqual($year,2009);
+        $this->assertEqual($yday,357);
+        $this->assertEqual($weekday,'Wednesday');
+        $this->assertEqual($month,'December');
+
+        $arr = usergetdate($ts);
+        $arr = array_values($arr);
+
+        list($seconds,$minutes,$hours,$mday,$wday,$mon,$year,$yday,$weekday,$month) = $arr;
+        $this->assertEqual($seconds,7);
+        $this->assertEqual($minutes,51);
+        $this->assertEqual($hours,11);
+        $this->assertEqual($mday,23);
+        $this->assertEqual($wday,3);
+        $this->assertEqual($mon,12);
+        $this->assertEqual($year,2009);
+        $this->assertEqual($yday,356);
+        $this->assertEqual($weekday,'Wednesday');
+        $this->assertEqual($month,'December');
 }
 
+}
\ No newline at end of file
 ?>
