diff options
author | Greg Westin <westin@users.sourceforge.net> | 2003-06-26 18:08:45 +0000 |
---|---|---|
committer | Greg Westin <westin@users.sourceforge.net> | 2003-06-26 18:08:45 +0000 |
commit | 17ec5c7bb0a403603732869abc755e7d78ff470d (patch) | |
tree | 606bd43949a4b985230e2d3980a2400fef2ecb07 | |
parent | 15bfda509838439e19f418e30b5d99cd102ad21a (diff) | |
download | phpicalendar-17ec5c7bb0a403603732869abc755e7d78ff470d.tar.gz phpicalendar-17ec5c7bb0a403603732869abc755e7d78ff470d.tar.bz2 phpicalendar-17ec5c7bb0a403603732869abc755e7d78ff470d.zip |
Fixed the problem of 'Go to Today' and similar links pointing to an incorrect date. It seems initialization of $today_today should be moved to functions/init.inc.php, but I didn't move it because I don't understand why any of the variables at the top of month.php, week.php, etc. are initialized there rather than in init.inc.php.
-rw-r--r-- | day.php | 2 | ||||
-rw-r--r-- | month.php | 2 | ||||
-rw-r--r-- | week.php | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -15,7 +15,7 @@ if ($minical_view == 'current') $minical_view = 'day'; $starttime = '0500'; $weekstart = 1; $unix_time = strtotime($getdate); -$today_today = date ('Ymd', $unix_time); +$today_today = date('Ymd', strtotime("now + $second_offset seconds")); $tomorrows_date = date( 'Ymd', strtotime('+1 day', $unix_time)); $yesterdays_date = date( 'Ymd', strtotime('-1 day', $unix_time)); $display_date = localizeDate($dateFormat_day, $unix_time); @@ -11,7 +11,7 @@ $this_month = $day_array2[2]; $this_year = $day_array2[1]; $unix_time = strtotime($getdate); -$today_today = date ('Ymd', $unix_time); +$today_today = date('Ymd', strtotime("now + $second_offset seconds")); $tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); $yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time)); $date = mktime(0,0,0,"$this_month","$this_day","$this_year"); @@ -9,7 +9,7 @@ $starttime = "0500"; $weekstart = 1; $unix_time = strtotime($getdate); $thisday2 = localizeDate($dateFormat_week_list, $unix_time); -$today_today = date ('Ymd', $unix_time); +$today_today = date('Ymd', strtotime("now + $second_offset seconds")); $next_week = date("Ymd", strtotime("+1 week", $unix_time)); $prev_week = date("Ymd", strtotime("-1 week", $unix_time)); $tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); |