When using the setting "show only current day" in a view, the office hours of the next day are displayed, if the start of the week is set to monday.
When sunday is set to be the starting day everything is fine.
Would be great if both would work! It's no big deal as the start of the week is irrelevant when showing only the current day, but it took me some time to trouble shoot why the next day is displayed instead of today. Fixing it might save others some time.

By the way: many thanks for implementing this feature, it saves me evil hacking this with PHP as I did in D7 :-)

Comments

wak created an issue. See original summary.

johnv’s picture

evil hacking this with PHP as I did in D7

' Hmm, a patch would have been appreaciated :-)

I will check this. I recall having tested it. It should work. Are you sure you are not working on a server in another time zone?

wak’s picture

Sorry, no Drupal developer here, it was a triple evil hack using views php, hence no patch. So glad I got rid of this.

Server is our university's webhosting system, nonetheless server time was among the first thing I checked. It was fine.

mayaslatinek’s picture

StatusFileSize
new611 bytes

For some reason, the function for reordering weekdays was reset every time and took into account the default order when showing only the current day. For me, this was solved with this patch but it should be tested on other days as well. Please test the patch.

mayaslatinek’s picture

Status: Active » Needs review
mayaslatinek’s picture

This is the right patch, it should work now.

johnv’s picture

StatusFileSize
new749 bytes

Testing only the entity formattter, not Views.
Thanks for the chatch, but I the error was on another location, wher the wrong key was compared.

johnv’s picture

Title: "Show only current day" depends on the start of week » Error in "Show only current day" depending on start of week

  • johnv committed 31e4bb8 on 8.x-1.x
    Issue #3022029 by Mark Slatinek: Error in 'Show only current day'...
johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.1
Component: Integrating Views » Code - formatter
Status: Needs review » Fixed
wak’s picture

Thanks, John, Patch #9 works perfectly for me :-)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.