View Full Version : [FIXED] Calendar bug in v2.2.9?
Boofo
Sat 1st Feb '03, 12:51am
I don't know if this has been reported yet (I looked here but didn't see anything regarding this.) My server time ios GMT and my local time is -600 (US Central time). When I go to the calendar at 11:00 pm (January 31st) my time, the calendar for February is showing, instead of the one for January like it should be. I fixed it by doing the following:
Find:
if (empty($year)) {
$year= date("Y");
}
if (empty($month)) {
$month= date("n");
}
and replace it with this:
if (empty($year)) {
$year= vbdate("Y",time());
}
if (empty($month)) {
$month= vbdate("n",time());
}
I have no hacks anywhere in the calendar.php, by the way.
Steve Machol
Sat 1st Feb '03, 1:16am
Confirmed on my forum. Moving to Bugs.
Scott MacVicar
Sun 2nd Feb '03, 8:23pm
sorted but use $ourtimenow instead of time()
Boofo
Sun 2nd Feb '03, 11:38pm
Originally posted by Scott MacVicar
sorted but use $ourtimenow instead of time()
Like this?
if (empty($year)) {
$year= vbdate("Y",$ourtimenow);
}
if (empty($month)) {
$month= vbdate("n",$ourtimenow);
}
Is that a new variable?
Scott MacVicar
Mon 3rd Feb '03, 6:30am
yes that is correct
Boofo
Mon 3rd Feb '03, 6:51am
Originally posted by Scott MacVicar
yes that is correct
Do I need to change all instances of time() to $ourtimenow then? Or are they basically the same thing? Sorry, but this is the first I have heard of this. :) And this only works with vbdate, right? Not date.
Scott MacVicar
Mon 3rd Feb '03, 8:55am
yes with vbdate, you'll find $ourtimenow at the top of functions.php, its just instead of calling time() multiple times.
Boofo
Mon 3rd Feb '03, 2:06pm
Originally posted by Scott MacVicar
yes with vbdate, you'll find $ourtimenow at the top of functions.php, its just instead of calling time() multiple times.
Thank you, sir. I never noticed that in functions.php before. $ourtimenow it is then. ;)
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.