From: moodler Date: Fri, 10 Jan 2003 05:41:20 +0000 (+0000) Subject: Fix when making timestamps from web selector X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3db75c62fc03007ba513c46cbe0cd754ca5cfb76;p=moodle.git Fix when making timestamps from web selector --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 28824220c0..61cc4b1f7e 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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) {