BackWPup changes the timezone when "doing ajax"
-
Hi.
To keep it simple (BackWPup 3.0.13):
frontend:echo date(‘H’); // 17
admin:
echo date(‘H’); // 17
ajax:
echo date(‘H’); // 12
Great, time travel! \o/
Since I use
date('H')in some nonces to restrict their validity to 1 hour, the plugin blows up my ajax calls 🙁The bad dude:
Filebackwpup/sdk/OpenCloud/OpenCloud/Globals.phpL53, 54, 130:if (!defined(‘RAXSDK_TIMEZONE’))
define(‘RAXSDK_TIMEZONE’, ‘America/Chicago’);
// …
date_default_timezone_set(RAXSDK_TIMEZONE);I can’t find any reason to change the timezone like that -_-‘
Maybe the plugin should defineRAXSDK_TIMEZONEbefore including the OpenCloud files.
This worked for me (inwp-config.php):if ( !defined(‘RAXSDK_TIMEZONE’) )
define(‘RAXSDK_TIMEZONE’, ‘UTC’);Cheers from a non America/Chicago country 😉
Greg
The topic ‘BackWPup changes the timezone when "doing ajax"’ is closed to new replies.