Skip to content

Commit

Permalink
Fix when making timestamps from web selector
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jan 10, 2003
1 parent 39e018b commit 3db75c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/moodlelib.php
Expand Up @@ -67,10 +67,11 @@ function set_config($name, $value) {

/// FUNCTIONS FOR HANDLING TIME ////////////////////////////////////////////

function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0) {
function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0, $timezone=99) {
/// Given date parts in user time, produce a GMT timestamp

return mktime((int)$hour,(int)$minute,(int)$second,(int)$month,(int)$day,(int)$year);
$time = gmmktime((int)$hour,(int)$minute,(int)$second,(int)$month,(int)$day,(int)$year);
return usertime($time, $timezone); // This is GMT
}

function format_time($totalsecs, $str=NULL) {
Expand Down

0 comments on commit 3db75c6

Please sign in to comment.