fix switcher to be TZ sensitive

This commit is contained in:
smilerz
2021-12-31 09:01:31 -06:00
parent 045a0b7d4f
commit 931eae4361

View File

@ -105,7 +105,9 @@ export default {
},
loadMealPlans: function () {
let apiClient = new ApiApiFactory()
let today = new Date(Date.now()).toISOString().split("T")[0]
// TODO move to utility function moment is in maintenance mode https://momentjs.com/docs/
var tzoffset = new Date().getTimezoneOffset() * 60000 //offset in milliseconds
let today = new Date(Date.now() - tzoffset).toISOString().split("T")[0]
apiClient
.listMealPlans({
query: {