Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I create the event I pick 18:00 then when I view the event I created it shows 17:00 ....
but I can go back to edit and on that screen it shows 18:00 really weird
Comment | File | Size | Author |
---|---|---|---|
#5 | event.module.52481.patch | 457 bytes | benthere |
event.png | 14.76 KB | joemoraca |
Comments
Comment #1
joemoraca CreditAttribution: joemoraca commentedIt works OK if I use 24hr time format just 12 hr format displays off one hour
Comment #2
seanrSame here. Sounds like someone screwed up some math. Marking as critical since it basically breaks event (and many people are not used to 24hr format)
Comment #3
nydrupalfan CreditAttribution: nydrupalfan commentedDarn, I am encountering the exact same bug. The listed times are off by one hour from what was input into the node form. There must be something wrong with the timezone conversions. Does anyone have a quick fix for this?
Comment #4
nydrupalfan CreditAttribution: nydrupalfan commentedEvent.module version 1.188 shows the correct time on the editing form in 12 hour format. I think the changes to the form in 1.189 might have introduced the bug.
Comment #5
benthere CreditAttribution: benthere commentedThis is still present in event.module,v 1.192 and is definitely critical.
I've put together a patch that puts back in a small portion of code that was replaced between 1.188 and 1.189.
I believe the problem is that 12h time needs to store 0 for hour 1, while 24h time stores 0 for hour 0 and so on. The patch should be improved, but seems to work for now.
Comment #6
benthere CreditAttribution: benthere commentedComment #7
benthere CreditAttribution: benthere commentedActually I don't know how the hour should be stored. What I said up 2 posts is wrong I think. But the patch of code that I copied out of 1.188 worked. I just don't know why it worked. Please take a look at the patch and clean it up if necessary.
Comment #8
seanbfuller CreditAttribution: seanbfuller commentedI can confirm that this fix works. The problem is that range(1, 12) gives you back an array where the label "1" is in position "0". For example:
Comment #9
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedapplied better patch
Comment #10
(not verified) CreditAttribution: commented