Skip to content

Commit

Permalink
Merge pull request #155 from culqi/fix/order-creation-date
Browse files Browse the repository at this point in the history
get wordpress timezone config
  • Loading branch information
JoseHCalderon authored Feb 10, 2023
2 parents 8fe9ec4 + f4db9ce commit feacab4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/admin/metaboxes/class-fullculqi-metaboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ public function sort_by_field( $wp_query ) {
public function setTimezoneCulqi($datetime)
{
$timezone_config = get_option('gmt_offset');
if(!$timezone_config) {
return $datetime;
$timezone_config = str_replace(".5",":30", $timezone_config);
if($timezone_config >= 0) {
$timezone_config = '+'.$timezone_config;
}
$timestamp = strtotime($datetime);
$datetime = new DateTime();
Expand Down

0 comments on commit feacab4

Please sign in to comment.