Skip to content

[Bug] First/Last visit displayed date doesn't take website timezone into account. #21645

@rsichnyi

Description

@rsichnyi

What happened?

In visitor details summary, the date of First,Last visit doesn't respect the website timezone, see the screenshot below:

image

The website is configured with timezone="America/New_York". The timestamp of this visit (based on api response for the same data) is 1701734804. This is correctly converted to EST timezone in the visit details on the right (green underline), but is not converted to EST in visitor details on the left (red underline). I assume (based on the code, haven't tested) the same is true for Last Visit.

What should happen?

Under the described conditions, First Visit date (red underline) should display "Monday, December 4, 2023".

How can this be reproduced?

Set the website time zone to EST, visit the website for the first time between 19:00 EST and midnight EST.

Matomo major version

Matomo 4

Matomo minor or patch Version

4.15.1

PHP version

8.2.11

Server operating system

Linux

What browsers are you seeing the problem on?

Not applicable (e.g. an API call etc.)

Computer operating system

Linux, Windows

Relevant log output

No response

Validations

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions