Search Forums
Forums
Kiwitrees on Twitter
    Tags

    gender change, 3.0.0. setup, emigration, ID notes, feedback, configure, places, .po, REFN, individual resource, chart, webtrees 1.4.4.1, translate, living, save settings, CHR, gallery, marriage, family navigator, place, menu, kiwitrees theme, simpl_grey, default individual, session, translation, gettext, edit options, .mo, bug reporting, tags, logs, mail, census assistant, errors, Favourites 3.0.0, resources, new feature, 3.2.0, statistics, xmas, 3.3.0, language, permissions, locked out, blocks, upgrade, 3.1.1, link, merge, person, styles, transifex, I18N, married, help, road map, GEDCOM errors, custom text, prefix

    #2297
    kiwi
    kiwi
    Keymaster

    1449 posts

    Roy

    Sorry, but I don’t think so. They appear to be correct, and are identical to Greg’s code in webtrees. Perhaps some explanation will help.

    UTC is defined here by the code format_timestamp(WT_TIMESTAMP)

    WT_TIMESTAMP is taken from (int)WT_DB::prepare("SELECT UNIX_TIMESTAMP()")->fetchOne()); This is a standard MySQL function that The above statement will return the unix timestamp in seconds as an unsigned integer since ‘1970-01-01 00:00:00’ UTC. (See more at: W3 Resource)

    “format_timestamp(WT_TIMESTAMP)” simply restates that time-stamp as a human-readable date. You can check the code for that in /includes/functions/function_date.php, line 88.

    Server time is fairly similar. It starts with format_timestamp(WT_SERVER_TIMESTAMP).

    WT_SERVER_TIMESTAMP is WT_TIMESTAMP + (int)date('Z')

    Date(‘Z’) is the standard PHP date function which provides the timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive. To do this it does require that date.timezone is correctly set to your locale in your php.ini file. I assume that is correct in your case? You can check it in Administration > PHP info.

    Nigel

    My personal kiwitrees site is www.our-families.info