]> git.mjollnir.org Git - moodle.git/commitdiff
Fix when making timestamps from web selector
authormoodler <moodler>
Fri, 10 Jan 2003 05:41:20 +0000 (05:41 +0000)
committermoodler <moodler>
Fri, 10 Jan 2003 05:41:20 +0000 (05:41 +0000)
lib/moodlelib.php

index 28824220c0f94ec3507f53174b44470cd185e4fc..61cc4b1f7ea028b7a6c1a3646d834226a8f5f86f 100644 (file)
@@ -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) {