• Resolved stoneyb

    (@stoneyb)


    Some recent update to File Away has set the UTC shown in WP’s General/Timezone to the local time. Correspondingly, the local time is very wrong. I was first told about this last week. I’m running File Away 3.9.8.2.

    I found another of my sites that was running File Away 3.9.6.1 and showed the correct time, so I updated it to 3.9.8.2 and the time broke.

    I see from a diff that you changed the way that you set the timezone to UTC and back again. I didn’t see anything obviously wrong in that code, but I expect that there’s a bug in it.

    I’m surprised that no one else has reported this.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author thomstark

    (@thomstark)

    [removing wrong info]

    • This reply was modified 5 years, 6 months ago by thomstark.
    Plugin Author thomstark

    (@thomstark)

    [removing wrong info]

    • This reply was modified 5 years, 6 months ago by thomstark.
    Plugin Author thomstark

    (@thomstark)

    Hang on, I’m looking further into this. I’m confused at the moment.

    Plugin Author thomstark

    (@thomstark)

    You know what? I’m a complete idiot and you are absolutely correct. I will fix this.

    Plugin Author thomstark

    (@thomstark)

    Open up wp-content/plugins/file-away/file-away.php and remove line 35:

    fileaway_utility::timezone();

    I missed that when I was removing updating timezone handling to meet WP’s requirements. That was a blatant oversight and I apologize. I will get a fix up asap.

    Thread Starter stoneyb

    (@stoneyb)

    That worked!

    I noticed a few places in File Away where fileaway_utility::timezone();
    is called, but there’s a return before
    date_default_timezone_set($original_timezone);
    is called, e.g. in class.fileaway_stats.php, line 118. That’s apparently not the cause of this problem, but it seems wrong anyway.

    I tried disabling all my plugins, then reactivating File Away. The time was correct until I activated only File Away, then it was wrong.

    I also checked all my themes for calls to date_default_timezone_set(), but there were none.

    I set the timezone in my php.ini to ‘UTC’, which didn’t make any difference.

    The evidence I see points to File Away as the culprit. I’m going to have to run this under a debugger to see what’s going on.

    Plugin Author thomstark

    (@thomstark)

    No, it was File Away. Apologies.

    I just pushed 3.9.8.3 which fixes the issue. THANK YOU for letting me know about this. Total oversight.

    Thread Starter stoneyb

    (@stoneyb)

    3.9.8.3 isn’t appearing yet, but I removed line 35 as you suggested, and everything works correctly now. Thanks!

    Plugin Author thomstark

    (@thomstark)

    Sorry about the inconvenience. I am very glad you spotted that issue. When I was removing the old way of handling timezone stuff per WordPress’s code review, I simply missed that line.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘File Away breaks time’ is closed to new replies.