Search Forums
Forums
Kiwitrees on Twitter
    Tags

    surname, Add a wife, access level, contacts, zend, type, fancy image bar, new feature, edit, 1939 Register, button, research, cousin tab, messaging, translation, kiwitrees 2.0.2, errors, cookie, googlemaps, styles, backup, CHR, Export/Import, lists individuals families, pdf, datatables, getClientIp, shared note, pages, title, github, IE problem, request, custom text, Administration, ASSO, widget, sanity, style, check, formatting, data errors, locked out, defacto, I18N, duplicates, 500, ID facts, support, tabs, census, set link, google, internal messaging, mobile, descendants, random_media, burial, webtrees, advanced

    #2297
    kiwi
    kiwi
    Keymaster

    1635 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