Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sale price scheduled dates get changed during migration #134

Open
leewillis77 opened this issue Oct 26, 2018 · 0 comments
Open

Sale price scheduled dates get changed during migration #134

leewillis77 opened this issue Oct 26, 2018 · 0 comments

Comments

@leewillis77
Copy link

The migration of sale price scheduled dates goes awry and it looks like it's out because it's taking timezones into account whereas the store data is UTC (I think).

Data before migration:

mysql > SELECT * from wc_postmeta WHERE meta_id IN (255,256);
+---------+---------+------------------------+--------------+
| meta_id | post_id | meta_key               | meta_value   |
+---------+---------+------------------------+--------------+
|     255 |      23 | _sale_price_dates_from | 1538348400   |
|     256 |      23 | _sale_price_dates_to   | 1561849200   |

Which is displayed in the UI as:
screenshot 2018-10-26 14 38 39

Data after migration:

mysql> select date_on_sale_from, date_on_sale_to from wc_wc_products where product_id = 23 \G ;
*************************** 1. row ***************************
date_on_sale_from: 2018-09-30 23:00:00
  date_on_sale_to: 2019-06-29 23:00:00
1 row in set (0.00 sec)

Which is displayed in the UI as:

screenshot 2018-10-26 14 38 46

WordPress' timezone is set to "London" (Currently UTC+1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants