alkacon/opencms-core — pull request #248 by parakelian (2014-05-26 09:07:39+00:00)
Title: Fix for Time Warp Feature (viewing resources with future dates)

The time warp feature didn't appear to be fully functional. The primary issue being that the request time of the request context was never being set to the specified warp time. Therefore it never simulated a future date, thus any resources with a future date were being rejected.

I found an existing issue opened by Areks here:
https://github.com/alkacon/opencms-core/issues/199

The proposed solution unfortunately didn't work for me, but we're attempting to fix the same issue.

The two issues that are addressed with this update:
1) If a warp time is set by the user, set the request time to it (see CmsElementUtil.java) so that pages with a future release date can be displayed in offline mode instead of throwing a CmsVfsResourceNotFoundException.
2) The change in #1 fixes the container pages, but a change is also needed for Solr queries (if Solr is being used in a page). For example, if a warp time is set, the filter query "released:[* TO NOW]" doesn't reflect the warp time. "NOW" should be replaced with the warp time, since the purpose of the warp time feature is to simulate how the page would react for a future date.