Thomas Göbe Posted November 26, 2023 Posted November 26, 2023 Hi, i have a problem that drives me crazy. In a project i have pages (template concert) with a DateTime Field "date_time" (output is "d.m.Y" for date and "H:i" for time, "d.m.Y H:i" for date and time). When i use this selector: $items = $pages->find('template=concert,sort=date_time,date_time>=today'); i get all the concerts in the right order by date. But inside a date, the concerts are not ordered by time. It looks like a random order to me. As far as i know, the datetime field uses a timestamp. So why is the order wrong? Why are the items only ordered by date? Is that a bug or am i missing somehing? I've spent nearly hours to seach for this topic, read documentation of selectors, the cheatsheet and even looked inside the datetimefieldtype code but could not find a solution.
Thomas Göbe Posted November 26, 2023 Author Posted November 26, 2023 Sorry, I've found a mistake on my side. I adjusted the output and did not see, that i added some hours before the output of the dates so every date was wrong. Sometimes it is good, to stop working for some hours, when such simple errors happen. Processwire works just fine and as aspected. My brain did not. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now