Our DXA 2.0 web app servers use Central European Time (CET) and access microservices hosted by SDL on servers using UTC/GMT. We have noticed that content and configuration was not always updated in the web application after republishing and (where necessary) admin/refresh.
If I access a binary file, DXA reads it from the content service and writes it to a file system cache. Subsequent attempts to read the binary file result in a check on the last published data metadata. If the time that the file was written is after the last published date, the binary is not updated.
The problem is that Tridion does not seem to provide the timezone with the last published date, and the CIL API assumes that it is thus in the timezone of the server running the web application.
We thus have a situation that if I access a binary at 09:00 CET, it is written to the filesystem with this timestamp. If I then republish at 09:15 CET to CD servers running on UTC, the microservices will tell me that the last published date is 08:15 (as this is the last modified date in UTC). The CIL then converts this to 08:15 CET, and when I access the binary subsequently, it sees thinks that the file is up to date (as the file creation time is later than the last published date). The only way to fix is to republish the binary after 10:00 CET (meaning the CIL thinks the last modified date is after 09:00 CET and thus rewrites the binary to the file system).
The standard answer to fix this would probably be why don't you set your server timezone to UTC, but this seems a bit lame to me. There may be many reasons to have your web application servers running in a local timezone, and Tridion should not force you to use UTC.
Is there instead some secret way to tell the CIL to use UTC instead of the local timezone when interpreting dates from the content service?