By rgfuchs on Tuesday, 27 March 2018
Replies 11
Likes 0
Views 1.5K
Votes 0
wrong-end_date.png


Hi,
I am trying to get the correct end date into the latest events module to show, but for some reason by simply adding - ${endDate(%d %b %Y) , I get the end date plus 1 day ! See attachment.

1) How to get the correct/ official end date ?

2) Is there also a way to have for one day events not to show the end date in this construct ?
Thanks
Hello,

What version of JEvents are you using?

Many thanks
Tony
·
Wednesday, 28 March 2018 06:50
·
0 Likes
·
0 Votes
·
0 Comments
·
The latest Version: 3.4.46
·
Wednesday, 28 March 2018 10:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok that is strange. geraint fixed this for multiday events in 3.4.46. Can you provide super user logins and FTP please.

Many thanks
Tony
·
Friday, 30 March 2018 09:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Can I check which timezone you are in and when your summertime/daylight savings change?

See https://www.jevents.net/frequently-asked-questions/custom-format-strings see the section about half way down the page ("Conditional Fields") which allows you to use different formats for all day events.
·
Monday, 02 April 2018 11:29
·
0 Likes
·
0 Votes
·
0 Comments
·
The server for the site is in Amsterdam, we are located in mainland Europe and use that timezone.

I am somewhat restricted in giving out username and password, if there would be another way to solve this I'd be grateful (otherwise I need to setup a special site)
·
Monday, 02 April 2018 12:19
·
0 Likes
·
0 Votes
·
0 Comments
·
We can try to isolate the issue without needing to access the server.

Is this problem specific to this date? If you create a similar test event on another date do you see the same problem?

Was the event created in JEvents or imported from an external calendar?
·
Tuesday, 03 April 2018 10:44
·
0 Likes
·
0 Votes
·
0 Comments
·
yes, see below, I added a new event from the jevents back-end in admin just now and while the end date is 2018-04-12 , it shows 13 Apr 2018 on the homepage
wrong-end-date2.png
·
Tuesday, 03 April 2018 20:42
·
0 Likes
·
0 Votes
·
0 Comments
·
It works fine for me on my server - you have set the timezone on the first tab of the JEvents config to Europe/Amsterdam??

Can you check your code in the file modules/mod_jevents_latest/tmpl/default/latest.php at line c. 1169, do you have this block of code?

// format endDate when midnight to show midnight!
if ($match == "endDate" && $dayEvent->sdn() == 59)
{
$tempEndDate = $endDate + 1;
if ($dayEvent->alldayevent() || $dayEvent->noendtime())
{
$jmatch = new JevDate($tempEndDate);
$jmatch->setTime(24,0,0);
// if an all day event then we don't want to roll to the next day
$jmatch->sub(new DateInterval('P1D'));
$tempEndDate = $jmatch;
}
$match = "tempEndDate";
}



Also please try using

${endDate(%I:%M%p %d %B %Y)}

temporarily so we can see the time associated with this end date in the module
·
Tuesday, 10 April 2018 09:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Actually - I think I've figured out what is going on.

Can you unzip and upload this file to modules/mod_jevents_latest/default/tmpl/latest.php and I believe it will resolve this issue
·
Tuesday, 10 April 2018 11:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Your wrote:
JEvents config to Europe/Amsterdam??

Indeed that was it ! I finally found it under the Advanced tab and it was empty before on "Select Timezone", instead of Europe/Amsterdam.

The dates are showing correctly now, with the original latest.php file

Thank you !!
·
Tuesday, 10 April 2018 12:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Ahh great! Thanks for letting us know :-)
·
Tuesday, 10 April 2018 20:59
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post