WordPress File Monitor Plus
[resolved] About the time of "Date Modified" and others (9 posts)

  1. o6asan
    Posted 5 years ago #

    Hi, Scott,

    I have a problem.

    My server uses UTC +9:00. But the WPFMP showes UTC +0:00 about "Date Modified" and others.

    So when I compare them, I need to think about the time difference each time. It makes me sick. Would you fix it?


  2. Scott Cariss
    Plugin Author

    Posted 5 years ago #

    Replace format_alert() function in plugin file with the following code:


    I will put this fix in the next version.

  3. o6asan
    Posted 5 years ago #

    Hi, Scott,

    I replaced and it worked.
    In Japanese its layout is "2011年6月9日 20:26".
    It's good for me.

    Thank you so much.

  4. Scott Cariss
    Plugin Author

    Posted 5 years ago #

    Now added to version 1.2

    By default the timestamp is taken by your WordPress time settings. There is also a filter that you can take manual control over this.

  5. o6asan
    Posted 5 years ago #

    Thank you for your release.

    I have a question. When I want to use the filter, do I need to edit the file wordpress-file-monitor-plus.php directly? Or can I find out a way in the admin setting?

  6. Scott Cariss
    Plugin Author

    Posted 5 years ago #

    OK o6asan, I'm going to have to push out a new version as I've modified the filter to keep the time stamp intact so people can apply a more useful function.

    Anyway once I've pushed this new update out here is how you use it:

    You can place this code in your theme functions.php file.

    add_filter('sc_wpfmp_format_file_modified_time', 'mytestfunc', 11, 2);
    function mytestfunc($formatted = NULL, $timestamp) {
    return date("d/m/Y", $timestamp);

    $formatted will hold how the date has been formatted by previous use of the filter.
    $timestamp will host the UNIX time stamp of the file modified time.

    The above code runs on priority 11, that is after the default filter usage thats run on 10. Below is the code for the filter that runs on 10:

    public function format_file_modified_time($formatted = NULL, $timestamp) {
    $date_format = get_option( 'date_format' ); // Get wordpress date format
    $time_format = get_option( 'time_format' ); // Get wordpress time format
    $gmt_offset = get_option( 'gmt_offset' ); // Get wordpress gmt offset
    $formatted = gmdate($date_format." @ ".$time_format, ($timestamp + ($gmt_offset * 3600)));
    return $formatted;

    I'll push out an update later today.

  7. o6asan
    Posted 5 years ago #

    Actually, I haven't understood what you say, yet.

    But before it, when I placed the code in my theme function.php file, it shows like this. Why?

  8. Scott Cariss
    Plugin Author

    Posted 5 years ago #


    1) make sure that you enclose the code I've given you in PHP tags <?php and ?>

    2) this code wont work yet. I need to update the filter in another version.

    3) whats wrong with the current date format? what do you want to change

  9. o6asan
    Posted 5 years ago #


    1) Oh! sorry. I forgot it. I fixed.

    2) I got it.

    3) Now, my WordPress default format is "2011年6月23日 @ 16:31". In Japanese, we don't much use the format in a cell on such a table because it occupies a lot of space. In a table, we often use the shortened type "2011/6/23" or "2011.6.23". So, I want to do so, when I display it in the table.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress File Monitor Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic