How to fix the current date in calendar module?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rosgar
Forum Members
Forum Members
Posts: 40
Joined: Sat Oct 13, 2007 6:28 am

How to fix the current date in calendar module?

Post by rosgar »

I recently installed the latest calendar module, but the the current date it show is yesterday. Meaning my time here today is Saturday, July 12. But the calendar module it shows Friday, July 11. Is it on the server side? calendar module? or somewhere inside the CMS?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: How to fix the current date in calendar module?

Post by Dr.CSS »

Currently it's pulling time from the server...
rosgar
Forum Members
Forum Members
Posts: 40
Joined: Sat Oct 13, 2007 6:28 am

Re: How to fix the current date in calendar module?

Post by rosgar »

OK, thanks, I'll check the server I'm using.
rosgar
Forum Members
Forum Members
Posts: 40
Joined: Sat Oct 13, 2007 6:28 am

Re: How to fix the current date in calendar module? [solved?]

Post by rosgar »

Well, I can't change the date or time zone because I'm using on a shared hosting environment.

Here's what I did,

this code seems working..

I added this code

Code: Select all

date_default_timezone_set('Pacific/Guam');
at the Calendar's module function.displaycalendar.php

(http://mysite.com/modules/Calendar/func ... lendar.php)

and place it on top

Code: Select all

<?php

date_default_timezone_set('Pacific/Guam');

url]function DisplayCalendar(&$module, $id, &$parameters, $returnid)
{
	global $gCms;..........
You can check this link for different time zones http://us3.php.net/manual/en/timezones.php

I wonder if this function can be included for future use. Setting the time zone for Calendar's module
Post Reply

Return to “Modules/Add-Ons”