statify icon indicating copy to clipboard operation
statify copied to clipboard

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

Open stklcode opened this issue 2 years ago • 1 comments

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 avatar Aug 25 '22 12:08 stklcode

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

sonarqubecloud[bot] avatar Aug 25 '22 12:08 sonarqubecloud[bot]

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

sonarqubecloud[bot] avatar Nov 04 '22 17:11 sonarqubecloud[bot]