From 3db75c62fc03007ba513c46cbe0cd754ca5cfb76 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 10 Jan 2003 05:41:20 +0000 Subject: [PATCH] Fix when making timestamps from web selector --- lib/moodlelib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) { -- 2.39.5