Hi Support Team,
I am reopening this issue https://toolset.com/forums/topic/time-zone-issue/ because it has not been solved.
We have moved the website to a VPS so now we have control over the server time, php time , and wordpress time from Setting ->General all these 3 are set to US/Chicago how ever the issue is we have this view see screenshot : hidden link
This view is querying all posts that have The Episode date time greater then NOW = (US/Chicago time zone).
I have inserted the view in the home page here : hidden link however it is not working as expected, it is only showing episode that are now +6 hours meaning GMT time. Currently my client kkfi have to set there post time 6 hours ahead of the local time in order to have it work correctly with our current time zone.
Please review the above and let me know if you need any more information or access to the server i would be happy to provide these to you.
Thanks
RED.
Dear Red,
I’ll send you a private email right now asking you for some private information that will help me debug this issue for you. Please check your email in a couple of minutes, and if you don’t get it, let me know so I can send it again. Thanks.
Regards,
Caridad
Hi CaridadZ,
I was just wondering if you had a chance to take a look at this issue.
Thanks
RED.
Dear Elamri,
Im re-reading your explanation and I noticed that your problem seems to be in the SQL query. Can you confirm that the time is correctly displayed in the single record?
During my testing, the server is set at UTC time and in WordPress Settings I use my local timezone. Everything seems to work, even using NOW in a filter, because the times are translated to UTC before saving to the database and also converted when submitting the filter.
Is it possible for you to set the server timezone to UTC or do you need it in your local time?
Regards,
Caridad
Hi CaridadZ,
Thanks for the reply.
Ok i have changed the server time to UTC : when i do the date command in linux this is the replay : Tue Nov 19 16:48:15 UTC 2013
Also i have changed the php.ini to UTC.date.timezone = UTC
Also the General Setting in wordpress is set to chicago this is out local time.
Now when i test it , does exactly the same thing i have setup a show for today at 12pm local it does not appear but when i set it to 6pm it will appear in the upcoming section.
Is there anything we can do to have this fixed? we do not want to have to set the time to UTC in order to make this work because it really makes things confusing.
Feel free to check your self.
If you would like to go over this in more detail with me online i would be open to connect with you via a messenger like Skype , gtalk or others.
Thanks
Red
Dear Elamri,
I was finally able to reproduce this issue and I will forward it to the developers for fixing. The filter is searching for the UTC time while the database is storing the local time.
To workaround this, open the file wp-views/embedded/common/wpv-filter-date-embedded.php and change line 34 to read:
case "NOW": $resulting_date = current_time('timestamp'); break;
This fix is only the for NOW() function. Next version of Views will have this fix fully included.
Regards,
Caridad