This Help forum is for issues relates to webtrees 1.7. For issues related to webtrees 2.0, please use that forum.
Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here."
  • Page:
  • 1

TOPIC:

Timezone is not reflected in logs? 3 weeks 3 days ago #1

  • trejder
  • trejder's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 159
I have just noticed that even though I have correct timezone set in my tree's configuration, my logs (latest changes) shows time shifted -2 hours (so in UTC). Searching this forum led me to "Last change time does not have time zone" (# 2497 ) issue and I noticed that my webtrees 1.7.17 suffers this problem.

Therefore I would like to kindly ask about some more information here:
  • Will this be back-ported to 1.7.X?
  • Do we have any estimate when this will be resolved
The last comment to # 2497 issue is made two days ago, but the whole story remains open for 2+ years. Hence the ask for some update. Thank you in advance.

Please Log in or Create an account to join the conversation.

Timezone is not reflected in logs? 3 weeks 2 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14947
> Will this be back-ported to 1.7.X?

1.7 has been in "major bug / security patch" only mode for several years.

All support will officially end on 6 Dec 2021 - when PHP 7.3 goes out of support.

> I have just noticed that even though I have correct timezone set in my tree's configuration, my logs (latest changes) shows time shifted -2 hours (so in UTC).

Your tree's configuration is not used here. The server logs contain information from many trees. They may all have different time-zones.

webtrees should be using the time-zone from your user account.

> The last comment to # 2497 issue is made two days ago, but the whole story remains open for 2+ years.

This issue says "GEDCOM CHAN:DATE:TIME fields don't contain time-zone information."

This is a statement of fact. They don't.

Just like every other date/time in your GEDCOM, facts doesn't have a timezone.

The issue is still open because there isn't a clear definition of the "correct" behaviour.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Timezone is not reflected in logs? 3 weeks 2 days ago #3

  • trejder
  • trejder's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 159
Thank you again for (as always) quick response and a fabulous support.

Maybe I try to redefine my problem.

Suppose that my GEDCOM file contains:
1 CHAN
2 DATE 24 SEP 2021
3 TIME 18:42:23

An this particular entry was made 5 seconds ago, by Webrees (no import-related issues). Why did Webtrees set an incorrect time (missing timezone part, time shifted -2 hours in my case), if "everything" is set to a correct time (timezone), i.e. server configuration, Webtrees configuration and even my browser's / local computer's time (if that would matter). All those three "elements" correctly say "It is 20:42:23" and yet Webtrees writes done 18:42:23.

Please Log in or Create an account to join the conversation.

Timezone is not reflected in logs? 3 weeks 2 days ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14947
> Why did Webtrees set an incorrect time (missing timezone part, time shifted -2 hours in my case)

This data structure does not support timezones.

We could use the local time of each user. But you can have several users, all editing together.

So, webtrees stores these in UTC.

If we know that they are stored in UTC, we have the possibility to convert.
But, if they are in many different time-zones, then we can never convert them.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Timezone is not reflected in logs? 3 weeks 2 days ago #5

  • trejder
  • trejder's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 159
> We could use the local time of each user. But you can have several users, all editing together.
> So, webtrees stores these in UTC

But from where or even how does the Webtrees "know" the UTC time, if both server (Apache, PHP) and browser feeds it with correct time / timezone?

My server is located in Poland / Eastern Europe. My Webtrees is set to Europe/Warsaw. My server right now feeds any PHP script running on in with UTC+2.

How it is even possible that Webtrees gets UTC time instead of UTC+2 from any source?

Please Log in or Create an account to join the conversation.

Timezone is not reflected in logs? 3 weeks 1 day ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14947
Your server knows the time.

If it knows that you are UTC+2, then it must also know UTC.

webtrees works internally in UTC, and converts to local timezone where possible.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Timezone is not reflected in logs? 3 weeks 1 day ago #7

  • trejder
  • trejder's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 159

webtrees works internally in UTC, and converts to local timezone where possible

I see. And I assume that it is not possible / not wanted for CHAN, right? Otherwise, it would be fixed.

Thank you.

Please Log in or Create an account to join the conversation.

Timezone is not reflected in logs? 3 weeks 1 day ago #8

  • norwegian_sardines
  • norwegian_sardines's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2164
The GEDCOM Specification does not allow for a timezone, see page 31 of the GEDCOM v5.5.1 documentation.
CHANGE_DATE:=
n CHAN {1:1}
  +1 DATE <CHANGE_DATE> {1:1} p.44
  +2 TIME <TIME_VALUE> {0:1} p.63
  +1 <<NOTE_STRUCTURE>> {0:M} p.37

And page 63:
TIME_VALUE:= {Size=1:12}
   [ hh:mm:ss.fs ]   The time of a specific event, usually a computer-timed event, where:
        hh = hours on a 24-hour clock,  mm = minutes, ss = seconds (optional),  fs = decimal fraction of a second (optional)

No provisions are made for a "time zone" in v5.5.1 of the GEDCOM Standard.

The Standard in v7.x will only slightly change but will still not include a specific timezone value. UTC will most likely be used in future webtrees releases if The Standard is followed.
Ken

Please Log in or Create an account to join the conversation.

Last edit: by norwegian_sardines.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 
  • Page:
  • 1
Powered by Kunena Forum