View Single Post
  #7  
Old 11 Aug 2017, 10:46
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Stingray27 View Post
You cannot, its basically a bug.

The changes made for php7 mean it will only work with whole hours, not 0.5 hours.
Originally Posted by Stingray27 View Post
It would need core code changes in multiple places I think
I'm looking at the code and comparing it to VB 4.2.3 which I assume worked, but all the code I see had hard coded multiplying the offset by 3600 (which is # of seconds in an hour 60*60) so I don't understand where partial hours come into the code.

Can anyone confirm the last version timezones worked correctly? Did they work in 4.2.4?

VB.com thread- https://www.vbulletin.com/forum/foru...r-update-4-2-5 (in case we get a fix.)

EDIT- I have confirmed the partial hours DO work in VB 4.2.4.

--------------- Added 11 Aug 2017 at 12:27 ---------------

OK it seems:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

is being forced to be an int somewhere in VB 4.2.5.

In VB 4.2.4 it can be a float. 30 minutes would be like 4.5 and 45 minutes would be like 6.25

Still checking code for fix.

--------------- Added 11 Aug 2017 at 14:27 ---------------

OK,

functions.php in the /includes/ directory.

Line 4503:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you remove intval from the code, the time works (you have to set the timezone again after making this change.

It works in the forum and posts. It does NOT work on calendar events, for some reason there are additional intval() functions in the calculator.

I'm going to look deeper into the security ramifications of removing the intval function from this line but a quick glace I see no problem.

--------------- Added 11 Aug 2017 at 14:40 ---------------

So my final determination is to simply change


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

on line 4503 of /includes/functions.php to get the time working on most of the site.

Unfortunately I don't see any way to make this a plugin, the manual edit it necessary.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.

Last edited by BirdOPrey5; 11 Aug 2017 at 12:16. Reason: making progress
Reply With Quote