Index: modules/flexinode/field_timestamp.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/flexinode/field_timestamp.inc,v
retrieving revision 1.9
diff -u -r1.9 field_timestamp.inc
--- modules/flexinode/field_timestamp.inc	16 Sep 2004 14:34:00 -0000	1.9
+++ modules/flexinode/field_timestamp.inc	6 Oct 2004 21:37:37 -0000
@@ -43,7 +43,7 @@
   // TODO: Make the years automatically populated instead of static.
 
   //determine settings for form's hour selector
-  if (variable_get('event_ampm', '0')) {
+  if (variable_get('flexinode_ampm', '0')) {
     $hour_format = 'g';
     $first_hour = 1;
     $last_hour = 12;
@@ -84,7 +84,7 @@
   $when .= form_select('', $prefix .'hour', $hour, $hours);
   $when .= ':';
   $when .= form_select('', $prefix .'minute', $minute, $minutes);
-  if (variable_get('event_ampm', '0')) {
+  if (variable_get('flexinode_ampm', '0')) {
     $when .= form_select('', $prefix .'ampm', $am_pm, $am_pms);
   }
   $when .= '</div></div>';
@@ -96,11 +96,11 @@
 function flexinode_validate_date(&$node, $prefix = '') {
   if (isset($node->{$prefix . 'year'}) && isset($node->{$prefix . 'month'}) && isset($node->{$prefix . 'day'}) && isset($node->{$prefix . 'hour'}) && isset($node->{$prefix . 'minute'})) {
     $hour = $node->{$prefix . 'hour'};
-    if (variable_get('event_ampm', '0')) {
-      if ($node->{$prefix . 'ampm'} == 'pm') {
+    if (variable_get('flexinode_ampm', '0')) {
+      if (($node->{$prefix . 'ampm'} == 'pm') && ($hour != 12)) {
         $hour += 12;
       }
-      elseif ($hour == 12) {
+      elseif (($node->ampm == 'am') && ($hour == 12)) {
         $hour -= 12;
       }
     }
@@ -140,4 +140,4 @@
 
 /** @} End of addtogroup themeable */
 
-?>
\ No newline at end of file
+?>
