--- zabbix-2.0.12_org/src/zabbix_agent/logfiles.c	2014-05-23 16:40:03.283982351 +0300
+++ zabbix-2.0.12/src/zabbix_agent/logfiles.c	2014-05-26 11:58:58.406987518 +0300
@@ -654,6 +654,9 @@ int	process_log(char *filename, zbx_uint
 		goto out;
 	}
 
+	if (NULL != mtime)
+		*mtime = (int)buf.st_mtime;
+
 	if ((zbx_uint64_t)buf.st_size == *lastlogsize)
 	{
 		/* The file size has not changed. Nothing to do. Here we do not deal with a case of changing */
@@ -685,9 +688,6 @@ int	process_log(char *filename, zbx_uint
 		*lastlogsize = l_size;
 		*skip_old_data = 0;
 
-		if (NULL != mtime)
-			*mtime = (int)buf.st_mtime;
-
 		ret = zbx_read2(f, lastlogsize, mtime, big_rec, encoding, regexps, regexps_num, pattern, p_count,
 				s_count, process_value, server, port, hostname, key);
 	}
