- ๐บ๐ธUnited States chrisgross
I am seeing this issue myself and changing the time zone to UTC in the feed config for the fields does not seem to work. I am in UTC -5 and have a JSON feed providing times in UTC. However, the date-only fields I am importing into end up with the wrong date if the times stamp is too close to midnight.
For example, the feed provides "2023-05-16T03:45:00.000Z" and when I import it, the destination field is "2023-05-16". But being in UTC -5, I need this to be "2023-05-15". Changing the time zone field in the feed mapping does not seem to affect this at all. This might be partially due to the fact that core's default date field handling seems pretty bad, but is there no way to fix this? Do I have to process the feed items in a custom Event Subscriber to correct this?
It may not be of use, I just want report that similar issue happens with the webform uploaded "created", "completed" and "altered" data in drupal 9. It goes back 1 day. Since It didn't had to be the exactly time I just adjusted it to 23:59:59 and the timezone (that I guess it's from US) pushed the date to next day, but it's a poor way of work around.
- ๐ฉ๐ฐDenmark jens peter
I had this exact problem.
I cannot understand why this is not sorted a long time ago, but guess the developers are from the USA so not important for them.I used #2: Feeds Tamper plugin โFind Replace REGEXโ
It works as long as I set the time zone to UTC. - ๐ณ๐ฑNetherlands megachriz
@jens peter
I cannot understand why this is not sorted a long time ago
Well, it is because I'm unable to address every issue. Feeds has more than 800 open issues and I also am maintainer of a few other projects on drupal.org. While I would like to get everything fixed, I can only do so much. ๐คทโโ๏ธ
but guess the developers are from the USA
Nope, I'm from the Netherlands. ๐ I import date values too, but apparently I'm not affected by this issue. I think that it is PHP who assumes American date formats by default.
If you like to get this issue addressed, you can help in the following way:
- By providing an automated test that demonstrates the issue.
- After that, by providing a fix that make that test pass.
- By joining the weekly Feeds meeting on Slack and help with reviewing or testing other issues that are being discussed during that meeting. The meeting is every Thursday on 19:00 UTC from November till March and 18:00 UTC from April till October.
- ๐ฉ๐ฐDenmark jens peter
@megachriz
Thank you. I fully understand how much work there must be in maintaining a module as this one.
I got the feeling that many have the same problem when they are located outside of the USA - maybe that is not the case.
If it is related to PHP it can be difficult to correct - I get that.But then a work around could be to make a tamper option that can correct this for the date field.
It has been present for 5 years :-) but I understand it might not be easy.I am not in a position to help on this as I am a designer - I have used Drupal since version 5 and was the most happy when it was called 7 - since then it has gone down hill - from best to very technical and not a good tool for a designer anymore.
I do appreciate your hard work on this module - I see you also have worked on many other parts I have used over the years.
Thank you.