1. make_timestamp: It's easy to be a fool, but to do it like me requires innate talent.

2. usertime: I think that the way Moodle is written, if this compensates for DST lots
   of things are going to break. I found a few myself and decided to revert the behavior
   until such time as a proper code review can be made.
This commit is contained in:
defacer 2005-04-10 09:41:46 +00:00
parent dd4b3f707e
commit dddb014acf

View File

@ -602,6 +602,8 @@ function get_user_preferences($name=NULL, $default=NULL, $userid=NULL) {
*/
function make_timestamp($year, $month=1, $day=1, $hour=0, $minute=0, $second=0, $timezone=99, $applydst=true) {
$timezone = get_user_timezone_offset($timezone);
if (abs($timezone) > 13) {
$time = mktime((int)$hour,(int)$minute,(int)$second,(int)$month,(int)$day,(int)$year, 0);
} else {
@ -789,7 +791,6 @@ function usertime($date, $timezone=99) {
$timezone = get_user_timezone_offset($timezone);
$date -= dst_offset_on($date);
if (abs($timezone) > 13) {
return $date;
}