I'm working with the 12hrs time format and attempting to set a closing time as 12:00 am (midnight). When choosing 12 00 AM it NULLS out the day in the database. Anyone else running into this? have a fix?
I'll see if I can come up with a patch in the meantime.

Comments

mnapier’s picture

Title: Choosing midnight as time » noon problems too

Just noticed that selecting 12 00 PM gets switched to 12 00 AM on the next edit and then the previously defined bug ends up wiping out that day.

mnapier’s picture

Title: noon problems too » Choosing midnight
StatusFileSize
new544 bytes

Here's a patch to fix the 12 00 PM from switching to 12 00 AM when editing.

mnapier’s picture

StatusFileSize
new511 bytes

Midnight fix patch. makes it so 0 (midnight) can be stored in the database.

Ozeuss’s picture

Thanks!
commiting both...

mnapier’s picture

something else must have not jived well with these patches on the latest release, there still seems to be some issues with 12 am.

mikl’s picture

Status: Active » Postponed (maintainer needs more info)

Original patch was committed here: http://drupal.org/cvs?commit=230630

If you are still having issues, please try to describe them so we can fix them :)

dflitner’s picture

I'm using the latest version available on the module's page, and if I set or change an Until time to 12:00 AM, it wipes the whole Office Hours fieldset.

I just checked, and it also wipes if I set the From time to midnight.

I'm using 12 hour settings, granularity is Hours.

btw, it seems to ignore granularity, since the drop-down menu for the minutes shows all minutes from 00 - 59. Unless I'm misunderstanding what the granularity is meant for.

Unfortunately, I can't use this module with this bug. Our building closes at midnight. I really like it though and will keep an eye out for updates.

mikl’s picture

#7: Just to be sure, are you using the Drupal 6 dev release or something else?

dflitner’s picture

Sorry I guess I didn't mention the version. Yes, I'm using the Drupal 6 dev release. I was going to apply the patch mentioned above, but I noticed that the code from the patch was already in the version of Office Hours that I was using.

vett’s picture

Having the same issue with 6 dev release. In the 12 hour format, if I choose 3pm - 12am, it does not save correctly. Those set of hours will just blank out.

Ozeuss’s picture

fix committed

johnv’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closing issue, since :

fix committed

Status: Fixed » Closed (fixed)

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