Support » Plugin: iThemes Security (formerly Better WP Security) » [Plugin: Better WP Security] Incorrect local time in Away Mode and Log

  • Resolved fchang

    (@fchang)


    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.

    http://wordpress.org/extend/plugins/better-wp-security/

Viewing 15 replies - 1 through 15 (of 22 total)
  • Ah ha. Thanks. Will look at it.

    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

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

    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.

    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.

    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.

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

    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?

    @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?

    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?

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

    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.

    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?

    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?

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Plugin: Better WP Security] Incorrect local time in Away Mode and Log’ is closed to new replies.