Skip to content

Commit

Permalink
Merge pull request #13 from mat128/strip_timezone_information
Browse files Browse the repository at this point in the history
Strip timezone information from date fields
  • Loading branch information
ChrisLundquist authored Jun 29, 2017
2 parents a7fe15d + 2db9ba8 commit 4e2e9ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pg2mysql.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ function pg2mysql($input, $header=true)
$line=str_replace(" timestamp with time zone"," timestamp",$line);
$line=str_replace(" timestamp without time zone"," timestamp",$line);

// Strip unsupported timezone information in date fields
$line=preg_replace("/ date DEFAULT '(.*)(\+|\-).*'/",' date DEFAULT \'${1}\'',$line);

//time
$line=str_replace(" time with time zone"," time",$line);
$line=str_replace(" time without time zone"," time",$line);
Expand Down

0 comments on commit 4e2e9ed

Please sign in to comment.