--- dbd_helper.c	2006-05-16 09:07:47.000000000 -0400
+++ dbd_helper.c.new	2006-05-16 09:05:04.000000000 -0400
@@ -272,6 +272,7 @@ time_t _dbd_parse_datetime(const char *r
 	int _tz_dir = 0;
 	int _tz_hours = 0;
 	int _tz_mins = 0;
+	int _hour_len = 2;
 
 	int check_time = 1;
 
@@ -339,8 +340,16 @@ time_t _dbd_parse_datetime(const char *r
 	          _tz_hours = atoi(cur);
 
 	        } else if (strlen(cur) > 3) { // hours and minutes
-	          _tz_mins = atoi(cur+2);
-	          cur[2] = '\0';
+		  
+		  _tz_start = strchr(cur, ':');
+		  if (_tz_start) { // 1-digit hour with separator
+		  	_hour_len = _tz_start - cur;
+		  }
+		  // otherwise, 2-digit hour, no separator
+
+	          _tz_mins = atoi(cur+_hour_len);
+
+	          cur[_hour_len] = '\0';
 	          _tz_hours = atoi(cur);
 				 
 	        } else { // just hours

