Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use same date retrieval for tracking and analysis (#227) #232

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

stklcode
Copy link
Contributor

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.

@stklcode stklcode added the bug label Aug 25, 2022
@stklcode stklcode linked an issue Aug 25, 2022 that may be closed by this pull request
@stklcode stklcode force-pushed the fix/227-timefunction branch from 89d0e9c to 70eee2f Compare November 1, 2022 10:23
@stklcode stklcode added this to the 1.8.4 milestone Nov 4, 2022
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.
@stklcode stklcode force-pushed the fix/227-timefunction branch from 70eee2f to cc9158f Compare November 4, 2022 17:29
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@stklcode stklcode merged commit fff36bb into develop Nov 4, 2022
@stklcode stklcode deleted the fix/227-timefunction branch November 4, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Overhaul the time functions
2 participants