In regards to the Moodle database, and the table 'mdl_assignment_submissions'... I'm curious as to how 'timemodified' is calculated or determined. Does anyone know how this is done?
All dates/times in Moodle are stored as "number of seconds since midnight, 1st of January, 1970 GMT". This may sound odd if you've not heard of it before, but it's the native method of many computer systems because it's a lot faster to do calculations with single decimal integers.
These times are converted back to user times using the userdate() function in Moodle, which takes into account the user's timezone.