Hello Team,
Event dates are getting reduced by a day when editing a particular event. This happens when the event is editied from US location. However, the dates are proper when accessed from India .
I am seeing a lot of issues related to the event dates in this forum. Please help us resolve this and let me know if you need any clarifications.
Thanks,
Pratheesh
Hi Jock,
try this solution:
Hello,
We tried this solution and it does not work. I echoed the variable $event ->startdate in events.forms.php and this itself backdates by 1. I wonder technically speaking whether the date has been modified from the $event object itself (during load and bind operations from edit function of event controllers).
Please let me know your clarifications, if any.
Thanks,
Pratheesh
Hello,
The FTP information provided is valid. I am not sure whether you are editing the proper files. We have a lot of customization for Jomsocial in models, controllers & view files and hence we have written overrides for Jomsocial default view files as well.
You can find the overrides at this location /httpdocs/templates/socialize/html/com_community. Please make sure the existing codes are not lost.
Thanks,
Pratheesh
Hi Jock,
please make sure your server timzone already +0/UTC
if already +0 and the issue still happening. please edit /templates/socialize/html/com_community/events.forms.php
at the top you can see
$startDate = date_create($event->startdate);
//date_timezone_set($startDate, timezone_open('UTC'));
$endDate = date_create($event->enddate);
//date_timezone_set($endDate, timezone_open('UTC'));
$startDate = date_create($event->startdate);
date_timezone_set($startDate, timezone_open('UTC'));
$endDate = date_create($event->enddate);
date_timezone_set($endDate, timezone_open('UTC'));
Hello Team,
We tried the solution and still we are getting this issue. The server timezone was already set to UTC and we also tried the changes that you mentioned.
Please let us know if you have any clarifications.
Thanks,
Pratheesh
Hi,
sorry, I just want make sure it again. did you try to changing the UTC into other value based on this list:
php.net/manual/en/timezones.php
?
if still not works, seem the issue at browser side.
Regards
Hello Team,
Yes, we tried changing the UTC into other values and still it does not work. What do you mean by browser side issue and how can we make sure this is a browser issue practically ?.
If this is is browser side issue, how can the startdate for the event back date by one ?. Please help us clarify on the same.
Thanks,
Pratheeesh
Hi,
becuase I cant reproduce this issue at my end. and the issue only happening at jomsocial 3.x
here the only solution:
I changing the code to
$startDate = date_create(date('Y-m-d',date(strtotime("+1 day", strtotime($event->startdate)))));
$endDate = date_create(date('Y-m-d',date(strtotime("+1 day", strtotime($event->enddate)))));