Skip to content

Commit a2fa0cf

Browse files
authored
Merge pull request ucsf-ckm#31 from stopfstedt/30_api_date_offset
corrected date calculation of "today".
2 parents 8c48ef0 + e732e3e commit a2fa0cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

public/class-wplibcalhours-public.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ protected function extract_hours( array $weeks_raw_data ) {
269269
*/
270270
public function api() {
271271
$ignore_cache = (boolean) get_option( 'wplibcalhours_ignore_cache' );
272-
$now = date( 'Y-m-d' );
272+
$timestamp = current_time( 'timestamp' );
273+
$now = date('Y-m-d', $timestamp);
273274
try {
274275
$data = $this->client->getRawData( $ignore_cache );
275276
$rhett = [];

0 commit comments

Comments
 (0)