Keyword

Date created in json view always in UTC?

More
6 years 6 months ago #167944 by MiX
Has anyone encountered such a situation:
  • In the database, the dates of making objects (k2 items) are in UTC - let's just say it's correct.
  • Offset for local time is included in the html view and feed - articles have the correct date / time.
  • Offset for local time is not included in the json view - the dates of the articles are as they were saved in the database.

I observed this in the following configuration:
Debian 9 (local time correct, universal time correct, RTC time - same as UTC), Apache 2, PHP 7.0.xx (the date.timezone variable is set in php.ini), MariaDB 10.x.xx, Joomla (latest) offset timezone selected, K2 (latest).

Can you change the json view to include the local time offset correctly?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 6 months ago #167982 by Krikor Boghossian
Replied by Krikor Boghossian on topic Date created in json view always in UTC?
Hello,
Is the issue present in the item or the itemlist (category, tag etc) views?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
6 years 6 months ago #167991 by MiX
Hello, thanks for the answer

I have seen this in the category view (view=itemlist&layout=category&task=category&id=...), tag view (view=itemlist&layout=tag&tag=...&task=tag), user's blog view (view=itemlist&layout=user&id=...&task=user) and in the article view (view=item&layout=item&id=...)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 6 months ago #168004 by Krikor Boghossian
Replied by Krikor Boghossian on topic Date created in json view always in UTC?
Thank you for your feedback,
I have marked it as an issue in Github github.com/getk2/k2/issues/450 so we can track its progress.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
2 years 10 months ago #179771 by RomyS
Replied by RomyS on topic Date created in json view always in UTC?
Hi team! I go back to this previous post as from what I see the date in the json is still UTC. And the issue is also open github.com/getk2/k2/issues/450
Is there an easy way to modify it? K2 version v2.10.3. Regards

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


Powered by Kunena Forum