Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

question-circle [SOLVED] Publish date shows current date always

More
11 years 5 months ago #1141 by admin
Replied by admin on topic Re: Publish date shows current date always
Thank you for screenshots, I got them.

I am looking at the one day off between the calendar and the date as text. The thing is, they both are using the same date object! I am investigating now the PHP functions I am using to separate the date in day/month/year chunks. The issue may just come from the fact that one date is keeping the time, the other not. I am investigating and will get back to you.

Olivier.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #1146 by admin
Replied by admin on topic Re: Publish date shows current date always
Can you check something for me?
PHP handles date functions using, as a base, the date.timezone property found in the php.ini.
I believe the date issue you are having is related to that.
If your Joomla! config is set on a timezone different from the one set in the php.ini file, you will get a difference.

Olivier.

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #1147 by taunwillis
SOLVED.
Yes, the calendar option was being affected by the Joomla (Global Configuration)'s "Server Time Zone". It was set to "Phoenix" (our time zone). When I changed it to use "Universal Time", it affected the calendar display's date.

Then, I changed the article author's local time zone to also use "Global Configuration". When I did that, the calendar date and the article publish date finally synced up. Now, when I change the publish date of the article, the calendar image matches it.

I'll do some playing with these two settings, but it appears that the Global time zone settings were affecting the calendar display, while the author's time zone settings were affecting the publish date.

Note: The Global Configuration time zone and the author's time zone were both set to "Phoenix". That will not be an unusual situation. Perhaps you can look into why the calendar display did not take that into consideration like the publish date did.

You can mark this thread as SOLVED. Thank you!

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #1148 by admin
The calendar display uses PHP to create separate parts of the date (day, weekday...) as I was trying to explain. But it does use the same date for a start as the other one. I have an idea on what to do to avoid PHP manipulations but it involves adding formatting strings into language files (like the DATE_FORMAT_... found in en-GB.ini for instance). I will look into it.
Anyway, glad your issue is resolved.

Olivier.

Please Log in or Create an account to join the conversation.