I get a unit test failure in 1.9.x stable.
Fail: lib/simpletest/testmoodlelib.php / ? moodlelib_test / ? test_usergetdate / ?
Equal expectation fails because [Integer: 3] differs from [Integer: 11] by 8 at [/Users/tim/Documents/workspace/moodle_19/lib/simpletest/testmoodlelib.php line 289]
The issue is that when you call usergetdate($ts) without the second argument, the result depends on $USER. What you should do is
1. At the start of this test, store $USER->timezone in a temporary variable.
2. Also at the start of the test, set $USER->timezone to a particular value.
3. At the end of the test, set $USER->timezone back to the real value that you stored in a temporary.