use same date retrieval for tracking and analysis (#227) #232
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We use "WP timestamp" in combination with strftime in the tracking
routine and retrieve WP Time in "Y-m-d" format for retrieval in the
dashboard logic. While it is discouraged to work with "WP Timestamps"
and strftime is deprecated as of PHP 8.1, is makes sense to use the same
source of time on both ends.
The present logic is not inherently wrong. The "WP timestmap" is
basically a unix timestamp with zone offeset already calculated and
parsing the result yields a local time value shifted to GMT. Zone is not
part of the output here, so it's effectively the same as Y-m-d local
date.
We not use the current time in Y-m-d notation on both ends without
breaking or invalidating the present logic.