Timeline for query orders by date AND time in craft commerce
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 21, 2017 at 12:53 | comment | added | alex_craze | sry, for my late reply. there is indeed something odd going on between our DB and craft - but as this behavior only occurs on the dev-environment I am just going to ignore this for now. Anyways, the original question was answered perfectly! thx alot. | |
Oct 14, 2017 at 6:16 | comment | added | carlcs | Something isn’t right, you should not need to factor in any timezone differences. | |
Oct 13, 2017 at 19:40 | vote | accept | alex_craze | ||
Oct 13, 2017 at 19:39 | comment | added | alex_craze |
Thanks a lot, of course '>= ' ~ dateFrom|date('c') works perfectly fine.. I didn't get any output before, because (i think) the database time is UTC and crafts dates are UTC+2. So I ended up taking the offset into account by doing this: {% set dateFrom = now|date_modify( ((now|date("Z") + 3600) * (-1)) ~' seconds') %} and .dateOrdered( '>= ' ~ dateFrom|date('c'))
|
|
Oct 13, 2017 at 11:31 | history | answered | carlcs | CC BY-SA 3.0 |