A wrong date last modification of my pedigree

Help
2011-09-17
2013-05-30
  • Vaclav Hajek
    Vaclav Hajek
    2011-09-17

    I want show date last modification of my pedogree and than I added this to file header.php in directory themes/simplygreen:
    $datposakt=date("d.m.Y", filemtime("../../index/pokus.php"));
    but the date is wrong.
    Can anybody help me?

     
  • Gerry Kroll
    Gerry Kroll
    2011-09-17

    What's "pokus.php"?

     
  • Vaclav Hajek
    Vaclav Hajek
    2011-09-17

    THX for your reply. pokus.php is only test file for testing of its date.

     
  • Gerry Kroll
    Gerry Kroll
    2011-09-17

    You'll have t be more specific about "but the date is wrong".  PHP caches information about files so that repeated enquiries about file status, etc. respond more quickly. 

    Check the on-line PHP manual (do a Google search for "PHP filemtime") for a description.  You can clear the cache to obtain true real-time information.  That's the clearstatcache() function.

    If you're trying to determine when your database was last modified and you're checking the GEDCOM's date & time of modification, you will need to set the GEDCOM configuration option to synchronize the database and GEDCOM.  If you have a significant number of persons in the database (more than 5000 or so), this can slow the program significantly when database changes occur.

     
  • Vaclav Hajek
    Vaclav Hajek
    2011-09-17

    THX for your reply.
    OK. Here is link on my site with problem:
    http://hajek-rodokmen.info/phpgedview42/index.php
    Look for this: Poslední aktualizace: 01.01.1970
    In english: Last modification: 01.01.1970
    Now I trying this:
    To file functions_print.php I added this function:
    function print_dat_pos_akt() {
    global $datposakt;
    $datposakt=date("d.m.Y", filemtime("../../index/pokus.php"));
    print $datposakt;
    }

    and

    in file header.php I call this function:

    <?php print_dat_pos_akt(); ?>

    but the date is still wrong.

    Here is my file header.php:
    http://hajek-rodokmen.info/tmp/header.php

    Thanks again for your interest.

     
  • Vaclav Hajek
    Vaclav Hajek
    2011-09-17

    Heureka. I found the solution. Here is my code:

    function print_dat_pos_akt() {
    global $datposakt;
    $datposakt=date("d.m.Y", filemtime(dirname(__FILE__)."/../../index/hajekjosef1886-20-12-05-08-ful-utf8"));
    print $datposakt;
    }
    Thank you for the opportunity to discuss with you.