The dates and times in the various Moodle database tables are stored as unix timestamps. How does Moodle convert these integers into the "human readable" dates that are displayed throughout Moodle?
Moodle uses the userdate function (in moodlelib.php) which is a wrapper (to handle timezones, etc) around the PHP function gmstrftime.