Skip to content

Commit

Permalink
Set the default timezone to avoid PHP warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
cfinke committed Feb 17, 2021
1 parent 439c5b4 commit a63116e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions messages-exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
die;
}

date_default_timezone_set( $options['t'] );

$timezone = new \DateTimeZone( $options['t'] );
$time_right_now = new \DateTime( 'now', $timezone );
$timezone_offset = $timezone->getOffset( $time_right_now );
Expand Down

0 comments on commit a63116e

Please sign in to comment.