Articles Anywhere: dates from calendar fields in...

Search
Other Bug Reports questions
Forum

Articles Anywhere: dates from calendar fields in UTC

Chris Egle's Avatar Chris Egle
In my articles, I use a number of calendar custom fields that are dates (time is not set). After upgrading from ArticlesAnywhere 15.x to 16.0.5, I am getting dates interpreted as UTC instead of the Joomla timezone (New York: UTC - 4:00). My guess is that the date is being read as the date at 00:00 UTC and then there's some code that interprets it in the local server time (4 hours earlier). If my date is 2024-03-25 in the calendar field, it then displays 2024-03-24 (at 20:00 local time).

In my testing, I set the server timezone to UTC; then the dates were correct. I need Joomla to be in our local timezone. Instead, I used the modify="+5 hours", to get the date in my ArticlesAnywhere "code" to match what the calendar field says in the article.

This brings me to a different issue. I could not get the modify="+5 hours" to run unless I also included a format option as well (ex. format="M j, Y").

Thank you for looking into these.

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Chris Egle's Avatar Chris Egle
Sorry for the delay.

I installed the development version, and it did not fix the issue. I ran the clean cache plugin and changed a date in the article just to verify that I was not looking at cached data. Unfortunately, I was not.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (s)ftp access to the dev site so I can take a look?
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Chris Egle's Avatar Chris Egle
Sure! I had to copy the site to something with less restrictions, but it still has the same date issue.
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
The ftp server is super slow and keeps 'hanging' and timing out half of the time.
So very frustrating to try and edit files and wait till it successfully transfers.
So slow progress...
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
But I think I have it fixed now...
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Chris Egle's Avatar Chris Egle
I'm sorry that the temporary site was timing out. Our dev server requires certificates to log in which was harder for me to set up quickly.

Thank you, the date issue is resolved!

The modify option issue still lingers. Perhaps you wanted to get this one fixed first.
Chris Egle's Avatar Chris Egle
Here's an example of the modify option issue:

If I enter
[startdate modify="+24 hours"]
the 24 hours are not added.

If I enter
[startdate format="M j, Y" modify="+24 hours"]
the 24 hours are added.
Peter van Westen's Avatar Peter van Westen ADMIN
The modify is working fine for me, both for core article dates and calendar fields.
date-field:
[date-field]
[date-field modify="+5 hours"]

datetime-field:
[datetime-field]
[datetime-field modify="+5 hours"]

created:
[created]
[created modify="+5 hours"]
Result:
date-field:
2024-02-01 00:00
2024-02-01 05:00

datetime-field:
2024-02-01 00:00
2024-02-01 05:00

created:
Saturday, 01 January 2022 01:00
Saturday, 01 January 2022 06:00
Please post a rating at the Joomla! Extensions Directory
Chris Egle's Avatar Chris Egle
Okay, I am glad it is working for you. I guess I have something installed that impacts this. Thank you for getting the calendar field working correctly with the timezone!
You can only post on this forum if you log in