Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Start Date not been reached

Start Date not been reached

Hi Stephen,
I have set everything correctly but Debug says start time has not been reached. I have set my time zone for Dublin (I am in Ireland) and I have entered a time with no date - I want the module to show every day at the same time. When I set start date instead of time (which ultimately I do not want to do) it works - any idea what I'm doing wrong?

Thanks in advance

cotter
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Start Date not been reached

Hi Cotter,

sorry to hear that this isn't working for you.

The first thing to check is whether you have MetaTemplate (free or pro) installed. If you do have, then there's a timezone dropdown in the MetaTemplate Preferences panel that overrides the one in the MetaMod. So, either set the time zone there or remove MetaTemplate.

If you didn't have MetaTemplate installed, then it's possible that your server just has a screwy date/time set up.

You can try the following code to see what date and time Joomla calculates based on the server time and the timezone dropdown in MetaMod. Paste the following into the MetaMod PHP box:

echo "Current date and time: " .
MM_YEAR . "-" .
MM_MONTH . "-" .
MM_DAY_OF_MONTH . " " .
MM_HOUR . ":" .
MM_MINUTE . ":" .
MM_SECOND;

Then try some different values of the timezone dropdown in MetaMod and see how the apparent time changes.

If the code above indicates the correct time for Dublin, but the date/time boxes still don't work when you put a time in, then there's a deeper problem.

Out of interest, how are you formatting the times that you put into the date/time boxes?

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

Re: Start Date not been reached

Hi Stephen,
Thanks for getting back to me. I tried everything you said but keep getting the same error. I have tried every variation of time format. I put the time back by 3 hours and then it worked. debug says I am in the Dublin Timezone though...? Time to talk to my hosting company? You're welcome to have a look if you like (if you have time - I will gladly make a donation to get this right!!!). let me know and I will pm you login...

cotter
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Start Date not been reached

Hi Cotter,

thanks for giving me access to look into this.

The short answer is that there's a bug in MetaMod's time handling. This used to work, but it doesn't appear to take into account the time zone set in the PHP ini file. Maybe PHP5.3 is causing more sites to actually set this... I don't know.

Anyway, until I fix this there's a great work-around that's going to prove even better for you in the long run.

I removed the module position name out of the "quick module id or position include" box, and removed the times from the start and end date/time boxes. Instead I'm using PHP code.

In the PHP box I put this:

if ($core_genius->inTimeSpan("12:00 - 23:30")) return "jonrichards";

This allows you to set up times of the day as time spans. The time spans can cross over midnight if necessary. Now you can add as many of these lines as necessary, each with the appropriate times. e.g. something like:

if ($core_genius->inTimeSpan("01:00 - 06:30")) return "overnight";
if ($core_genius->inTimeSpan("06:00 - 09:00")) return "early";
if ($core_genius->inTimeSpan("09:00 - 12:00")) return "morning";
if ($core_genius->inTimeSpan("12:00 - 23:30")) return "jonrichards";
if ($core_genius->inTimeSpan("23:30 - 01:00")) return "late";

The documentation this is here: http://www.metamodpro.com/jomgenius/par … intimespan

You can even set up particular days of the week etc. Just be sure to follow the syntax in the documentation - it's quite picky.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

Re: Start Date not been reached

Thanks Stephen,
You be a genius dog - I put some money in your Paypal :-)

cotter
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Start Date not been reached

Thanks Cotter :-)

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11570
Newest User:
moises1247
Members Online:
1
Guests Online:
175

Online: 
moises1247

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked