iThemes Security (formerly Better WP Security)
[resolved] [Plugin: Better WP Security] Incorrect local time in Away Mode and Log (23 posts)

  1. fchang
    Posted 3 years ago #

    Time zone selected under WP is:

    Timezone = Toronto
    UTC time is 2012-08-04 4:16:53
    Local time is 2012-08-04 0:16:53

    Under the BWPS's Away Mode page:
    ... your local time is Friday, August 3rd, 2012 at 8:17 pm. ...

    I've check the log and the it is also displaying the wrong local time. Seems like the local time computation under BWPS is subtracting the timezone offset twice. Toronto is UTC-4 right now (daylight saving).

    Thanks for looking into this.


  2. Ah ha. Thanks. Will look at it.

  3. I've updated the logic in awaymode. Can you please check it in the dev version and let me know if it is working for you: http://downloads.wordpress.org/plugin/better-wp-security.zip

  4. fchang
    Posted 3 years ago #

    Sorry, never done this before. How do I put in the dev version? Do I replace all the files in the plugin's folder?

  5. fireman911
    Posted 3 years ago #

    I have the exact same problem and I also don't know how to put it in Dev mode. An explanation would be greatly appreciated.

  6. dukejames27
    Posted 3 years ago #

  7. Hi all,

    I launched the [I think] fixed code in 3.4.2. Are you still having the issue?

    @duke yes, they are similar issues.

  8. fchang
    Posted 3 years ago #

    Yes, got 3.4.2, did a 'save options'. Still got the wrong local time under the Away Mode, but different from before.

    My info:
    Toronto time: Aug 13, 2012, 11:25pm (UTC-4 due to daylight saving time)
    Away mode local time display: Aug 14, 2012, 1:25am

    So it is now 2 hours ahead instead of 4 hours back as in my first post.

    Thanks for looking into this.

  9. @fchang... Hmm... I ran a site with timezone set to "Toronto" without issue. Are you set to "Toronto" or a manual offset?

  10. fchang
    Posted 3 years ago #

    Yes, I have the timezone set to "Toronto". My WP settings page showed the correct UTC and Local time. We are currently in daylight savings time.

    Anyone besides me still having the same issue after updating to 3.4.2?

  11. dukejames27
    Posted 3 years ago #

    @fchang - I'm in eastern time zone and haven't tested the latest version with away mode enabled yet. I'll test it out tomorrow and let you know.

    @bit51 - I remember reading the suggestion before but have you considered enforcing the away mode based on a users role?

  12. dukejames27
    Posted 3 years ago #

    I just wanted to point out something I thought was wierd. I configured Away Mode as follows.

    One Time
    August 20, 2012 to August 20, 2012
    10am to 10:05am

    After saving, at the top of the page it say

    The ending date must be after the current date.

    However at the bottom of the page, under Away Rules, it says

    The backend (administrative section) of this site will be unavailable from Monday, August 20th, 2012 at 10:00 am until Monday, August 20th, 2012 at 10:05 am.

    I'm testing it now to see if the were saved or not.....Nope, they weren't. I'll do it as a Daily rule instead.

    If the settings were incorrect, I think the lower message shouldn't state that the backend would be unavailable. Perhaps instead, it should say nothing or repeat the same message as above?

  13. dukejames27
    Posted 3 years ago #

    Away Mode appears to be working for me! I'll do a few more tests throughout the day to be sure.

  14. dukejames27
    Posted 3 years ago #

    I've undergone several tests and it's working flawlessly for me. The only thing is, it doesn't seem to support daylight savings time when I choose UTC -5. When I choose my state, I get the right time though.

  15. Thanks @duke.... Yes, I will eventually work roles in. The catch is how to handle it if the user isn't logged in (if I disable logins I won't know what the role is).

    @fchang is it working for you now as well with 3.4.3?

  16. fchang
    Posted 3 years ago #

    Ok, just tested it with 3.4.3. Nope does not work (using Daily as I cannot config same date under One Time). I tried to use the 'wrong' time displayed on top of the page (i.e., 2 hours ahead of the local time) and it worked. So the local time is not computed correctly for me for the plugin. May be due to daylight saving time as @dukejames27 got it working perfectly?

  17. RJKJR
    Posted 3 years ago #

    I'm having the same problem running Better WP Security 3.4.3 (build 3052) on WP 3.4.1.

    From my WP Options page:
    Los Angeles
    UTC time is 2012-08-28 4:27:23
    Local time is 2012-08-27 21:27:23
    This timezone is currently in daylight saving time.
    Standard time begins on: November 4, 2012 2:00 AM.

    From the Away Tab in Better WP Security:
    Monday, August 27th, 2012 at 11:27 pm.

    As you can see Better WP Security is two hours ahead.

  18. @RJKJR and @fchang. Thank you. The 2 hours will give me a little more to go on. I have sites of my own in 4 time zones and cannot duplicate the issue *sigh*

  19. Lab Lover
    Posted 3 years ago #

    Sorry to play "pile on" here, but I am experiencing a similar issue. When exploring away mode, I saw your plugin reported my local time as being 0103 when in fact it is 0803.

    I checked my WP general settings and the time zone is correctly set to Los Angeles and my local time is accurately displayed in general settings. As an experiment, I changed my timezone to a random selection and that change was reflected on the away mode page.

    I experimented with changing the time format, standard AM/PM to 24hr time and apparently it makes no difference to BWPS.

  20. Lab Lover
    Posted 3 years ago #

    I should also add I am utilizing version 3.4.4 of BWPS. Subsequent to authoring the above post, I tried changing the timezone to the correct manual offset -7. When I checked BWPS away mode, the time detected had changed from 7 hours behind to 2 hours ahead.

    I hope this helps

  21. tonyasheridan
    Posted 3 years ago #

    The away mode in Better WP is displaying an incorrect time that is 6 hours earlier than the time in my WP timezone settings. I have tried changing to a another city in my same time zone to see if that would work but it didn't.

    Is there another area in my WP site where I need to change the time zone as well or is this a problem with the plugin?

  22. Lab Lover
    Posted 3 years ago #

    The author of this plugin does not consider this problem to be a priority. In the year I have been using BWPS no one has offered a working solution. It apparently has something to do with the hosting company as the problem appears on one host but not on the others.

    I wish I had better news for you.

  23. tonyasheridan
    Posted 3 years ago #

    Hi Lab Lover,

    Thank you so much for your response. Even though you don't have an answer, I really appreciate you taking the time to respond. I will check with my hosting company to see if they might have a solution.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic