proginosko / LeechBlockNG

LeechBlock NG (Next Generation) for Firefox is a simple productivity tool designed to block those time-wasting sites that can suck the life out of your working day. All you need to do is specify which sites to block and when to block them.
https://www.proginosko.com/leechblock/
Mozilla Public License 2.0
723 stars 66 forks source link

Wrong unblocked time calculation: 12 am insteam of 3 am #257

Closed d9k closed 2 years ago

d9k commented 2 years ago

Settings: When to unblock:

Enter the time periods within which to block these sites (optional): 0000-2400
Enter a time limit after which to block these sites (optional): 30 minutes in every 3 hours.

30 minutes elapsed at 23:50

Expected unblocked time: 3 am Actual unblocked time: 12 am

My timezone: GMT +3

Settings screenshot:

Screenshot from 2022-08-04 00-34-43

Leechblock block page screenshot at 0:35:

Screenshot from 2022-08-04 00-34-16

d9k commented 2 years ago

If I temporary set 4 hours recharge interval instead of 3 hours:

Enter a time limit after which to block these sites (optional): 30 minutes in every 4 hours.

I temporary get

The page will be unblocked at: 1:00:00 AM

on block page

proginosko commented 2 years ago

Please try this: go to the LeechBlock Options page, open the browser console (Ctrl+Shift+I), enter new Date(); at the prompt, and see if the return value gives you the correct date and time.