in reply to Re^2: Find the text
in thread Find the text
It looks like you are trying to iterate over all whole minutes in a 30 minutes interval. That solution is very ineffective.
If you have two dates, one from your file and one from the system time, just ensure that they are unix time (seconds since 1/1/1970 00:00) and then subtract one from the other and then see if the result is between 0 and 1800. This is the criteria that decides if a given FIND line is taking place within the next half hour.
System time is already in unix time, so all you need is converting the time stamps from the file to seconds since epoch. There are plenty of modules that can do it for you.
Also, please do this:
|
|---|