statify
statify copied to clipboard
use same date retrieval for tracking and analysis (#227)
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.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication