If you choose 12pm as your start or end time, the entire start or end date and time turns to all zeros.

Michelle

CommentFileSizeAuthor
#3 fixnoon.patch563 bytesmichelle

Comments

michelle’s picture

Found and fixed the problem but toddler is acting up... Will post the fix in a little while.

Michelle

michelle’s picture

Status: Active » Needs review

Ok, here's the fix. I'm setting this as a patch even though it's not really a patch. I'll try to learn how to make patches soon so I can attach real patch files. In the mean time, this is the code that needs changing.

In function event_nodeapi:

        if (!isset($node->event_start)) {
          if (variable_get('event_ampm', '0')) {
            if ($node->start_ampm == 'pm' && $node->start_hour < 12) {
              $node->start_hour += 12;
            }
            if ($node->end_ampm == 'pm') {
              $node->end_hour += 12;
            }
          }

I added the " && $node->start_hour < 12" part. The problem is that 12 pm was getting change to 24, which blew everything up. Adding that extra test keeps it from adding 12 to 12.

Michelle

michelle’s picture

StatusFileSize
new563 bytes

Ok, having a go at a patch.

Michelle

killes@www.drop.org’s picture

I've committed different patch, can you check whther this issue is now fixed for you? Please change status as appropriate.

michelle’s picture

Status: Needs review » Fixed

Tested. Your patch fixed it.

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)
dga5000’s picture