// To send Last-Modified and support If-Modified-Since, we need to detect
// the last modified time
wfProfileIn( __METHOD__.'-getModifiedTime' );
- $mtime = $wgCacheEpoch;
+ $mtime = wfTimestamp( TS_UNIX, $wgCacheEpoch );
foreach ( $modules as $module ) {
// Bypass squid cache if the request includes any private modules
if ( $module->getGroup() === 'private' ) {
}
// Automatically register module
else {
- $mtime = max( $module->getModifiedTime( $context ), $wgCacheEpoch );
+ $mtime = max( $module->getModifiedTime( $context ), wfTimestamp( TS_UNIX, $wgCacheEpoch ) );
// Modules without dependencies or a group pass two arguments (name, timestamp) to
// mediaWiki.loader.register()
if ( !count( $module->getDependencies() && $module->getGroup() === null ) ) {
// ATTENTION!: Because of the line above, this is not going to cause infinite recursion - think carefully
// before making changes to this code!
- $time = $wgCacheEpoch;
+ $time = wfTimestamp( TS_UNIX, $wgCacheEpoch );
foreach ( $context->getResourceLoader()->getModules() as $module ) {
$time = max( $time, $module->getModifiedTime( $context ) );
}