Welcome, Guest
Username: Password: Remember me
Keyword
  • Page:
  • 1
  • 2

TOPIC: Date mismatch on GAD

Date mismatch on GAD 2 years 8 months ago #10711

Hello,
I have a problem on the GAD, I have set up a resource that is only available on monday and restricted the Disable Dates in the way it shows up just on Monday April 2nd.
In the Gad the resource shows up but for the day before, Sunday April 1st.
The very strange thing is, as you can see in the screenshot, mouseovering the date, the javascript code shows the correct date: in fact if I click on the April 1st date, the GAD shows me April 2nd.

errore_abpro.gif


I already tried both patches $jdate_fix and commenting the lines as suggested here without success.

I run Joomla 2.5.3 on linux centos.
thank you for your support.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10712

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
Try 2.0.3, beta 6 Mar 23/12.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10714

uh just published the new release! trying it now. thank you.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10715

nope, it has not been fixed with beta6 :unsure:
this is the source code:
<td align="center" class="sv_gad_timeslot_yaxis_header"><a href="javascript:changeMode2('2012-04-02')"> Dom 01-Apr-2012</a></td>

I've temporarely patched by myself gad_ajax.php at line 571 setting $day+1 in the DateAdd function, of course it should be just a display error not compromising anything else.

The code behind the timeslot is correct:
<a class="sv_gad_timeslot_clickable" onclick="selectTimeslot('1|Q29yc28gZGkgUGFzcXVh|2012-04-02|RG9tIDAxLUFwci0yMDEy|18:45:00|MTg6NDU=|22:00:00|MjI6MDA=|ts1', event);return false;" onmouseover="checkWhoBooked("ts1");return true;" href="#">5</a>
there is 2012-04-02

but when I click on the timeslot, the booking remainder line still says April 1st. anyway if I confirm the booking I correctly have April 2nd reserved :blink:
Last Edit: 2 years 8 months ago by Davide Giacobbe. Reason: more infos
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10716

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
I am guessing you are in GMT+1 time zone.
I have had some problems reported there that I cannot reproduce here, even when I setup a server with that timezone.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10717

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
Additional..
In J1.5 ABPro used php date functions. A bug introduced in J1.6 broke code that used native php so ABPro was switched to use JDate, with a work around for the toFormat bug.

There seems to be a new JDate problem with timezones and DST that only really shows up with timezone right around UTC(GMT). This can be see in the date showing different in the changeMode vs the displayed date. One uses php the other JDate.

Bottom line, is you could go back to pure php now the original Joomla bug is fixed.

I cannot test this as I cannot get it to fail, it shows the correct date regardless of weather I use php date or JDate.

To test edit file: gad_ajax.php

Around line 585 look for:
$weekday = date("w",(DateAdd("d", $day, strtotime($grid_date))));
$strDate = date("Y-m-d",(DateAdd("d", $day, strtotime($grid_date))));

Add an override for $dayname, which was set a few line earlier with JDate.
$weekday = date("w",(DateAdd("d", $day, strtotime($grid_date))));
$strDate = date("Y-m-d",(DateAdd("d", $day, strtotime($grid_date))));

$dayname = date('D d-M-Y',(DateAdd("d", $day, strtotime($grid_date))));

Now php is used for all dates in the single-resource-multi-day view.

It should also be noted, the JDate's toFormat() uses a different type of format string than does php date(), so the format string stored in your ABPro config will be wrong. I have set the format in the date call to 'D d-M-Y'.
Last Edit: 2 years 8 months ago by ABPro Support.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10741

thank you,
yes you are right I'm in GMT+1 (italy as many other EU conuntries).

adding that line what I've got is:
- the dates on Y-axis are correct (like setting d+1 as I did before) but the weekday is now in english and not in my language;
- changemode has the correct date in it;
- but the string summarizing the booking date (first line with green background) still reports the wrong day;
- the booking is taken in the right day.


errore_abpro2.gif


So actually the result is the same than passing d+1 with JDate at line 571 (except that I've lost weekdays localization).

Do you think I should do another little patch for the green line to display the correct day? maybe just a d+1 using JDate so I keep the correct weekday name? can you point me where in the code is it?
thank you.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10744

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
Do you think I should do another little patch for the green line to display the correct day?
If you can figure a way to make it work, try it.
At this time I cannot reproduce the problem and have no other suggestions as to how to make it work on your site.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10781

  • eugene
  • eugene's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0
I just installed this component and have the same problem. But I cannot imagine how to fix it. I added the line
$dayname = date('D d-M-Y',(DateAdd("d", $day, strtotime($grid_date))));
and had fixed only grid display, but when I press the slot I see that I choose sunday not monday as it shoud be.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10782

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
If you are not currently running J2.5, upgrade to Joomla 2.5.x.

Set ABPro Time on Y-Axis = No in the Configure screen, Graphic Availability tab.

If the problem persists..

I have no solution to this issue. It only seems to effect _some_ people in timezone GMT+1(UTC+1) and I cannot reproduce the behavior.

You might try these changes to gad_ajax.php:
  • - remove the line you put in
  • - un-comment line 61, comment out line 63 so you end up with $jdate_fix = " UTC";
  • - un-comment all the //date_default_timezone_set($timezone_identifier); lines

    Do a search and replace of

    //date_default_timezone_set($timezone_identifier);
    with
    date_default_timezone_set($timezone_identifier);
    .
Last Edit: 2 years 8 months ago by ABPro Support.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10800

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
As an alternate solution(?) I have made a gad_ajax.php file that uses only php date functions, no JDate at all.

This works fine here, but so does the JDate one so this is a bit of a shot in the dark.

If you wish you can download this gad_ajax.php file and put it into your ABPro 2.0.3 beta 6.
gad_ajax.php

Also..ensure your 'Time on Y-Axis' is set to 'No' in ABPro Configure screen, Graphic Availability tab.

#UPDATE#
See appointmentbookingpro.com/how-to/170-dea...mis-match-issue.html
Last Edit: 2 years 7 months ago by ABPro Support.
The administrator has disabled public write access.
The following user(s) said Thank You: eugene

Re: Date mismatch on GAD 2 years 8 months ago #10807

  • eugene
  • eugene's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0
Thank you! It works now.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10811

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
Good news.

Just to confirm, the fix was when you downloaded and installed the modified gad_ajax.php?
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10813

  • eugene
  • eugene's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0
absolutely so)
thank you again
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10828

I confirm that the patched script works also for me, but with the untranslated weekday as I was writing before: the weekdays are always in English while with Jdate they got regularly translated.

Rob do you have a clue why this happens even if the correct setlocale has been set (also forcing it to my 'it-IT' string)?
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #10830

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
Are you using J 1.6?

There was a bug with setlocale in Joomla 1.6 but it was suppose to have been fixed...
joomlacode.org/gf/project/joomla/tracker...racker_item_id=22182

Additional..
You might try embellishing the setlocale call.
See 'Examples' in php docs www.php.net/manual/en/function.setlocale.php

Are you using a Windows server?
Maybe a different setlocale syntax(?)..
www.phpnews.it/articoli/ottenere-date-in-italiano/
Last Edit: 2 years 8 months ago by ABPro Support.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #11008

Hi,
i have j2.5.4+ABPro 2.0.3 beta 6
I changed the gad_ajax.php file (date error in UTC+1 timezone)
Booking date and other works fine with new gad_ajax.php, but on Gad booking the day names translates are missing, only english day names stay here.
If I change back to old gad_ajax.php file the days translates are ok but with booking will one day difference.
What can i do?
Last Edit: 2 years 8 months ago by Tibor Perkó.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #11013

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
day names translates are missing
The earlier posting in this thread discusses that.

ABPro takes the current language tag and uses that in the php setlocale() function. Now day and month names returned by php will be in the appropriate language. If yours is not working you might try hard coding the setlocale() call.
In your gad_ajax.php file around line 72 look for:
$lang =& JFactory::getLanguage();
setlocale(LC_ALL, $lang->getTag());


Change to hard code in your language.

See also...
php.net/manual/en/function.setlocale.php
Last Edit: 2 years 8 months ago by ABPro Support.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #11015

  • eugene
  • eugene's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Karma: 0
I'm actually have the same problem as Pkr describe. And sorry I didn't understood what should I do to fix it.
The administrator has disabled public write access.

Re: Date mismatch on GAD 2 years 8 months ago #11019

  • ABPro Support
  • ABPro Support's Avatar
  • OFFLINE
  • Moderator
  • Posts: 6620
  • Thank you received: 315
  • Karma: 161
ABPro will set the php locale based on your Joomla timezone.
If yours is not doing that you might try hard coding the language code,
I cannot say if this will 'fix' your problem as I am unable to reproduce any problems here.

The file and lines are specified in the previous postings.
For information on the php setlocal() function see
php.net/manual/en/function.setlocale.php
The administrator has disabled public write access.
The following user(s) said Thank You: Tibor Perkó
  • Page:
  • 1
  • 2
Time to create page: 0.279 seconds

Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013