--- zabbix-2.2.3_org/src/zabbix_agent/logfiles.c	2014-05-26 12:55:40.807113797 +0300
+++ zabbix-2.2.3/src/zabbix_agent/logfiles.c	2014-05-26 12:53:35.655109152 +0300
@@ -930,6 +930,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 */
@@ -961,9 +964,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, pattern, output_template, p_count,
 				s_count, process_value, server, port, hostname, key);
 	}
