Hello,

I'm trying to compare two timestamps (from different sources).

(let ((fetchtime (match-string 2))
      (mtime (nth 5 (file-attributes file))))
      (cond ((= (float-time mtime) fetchtime)
             (...blah blah...do something)
             etc. etc.)))

'fetchtime' is a string (from a regexp match) which has the epoch-time. I
also obtain the file timestamp from file-attributes. I convert this to
epoch-time and try to compare. Problem is that 'fetchtime' is a string. So
trying to convert them to the same data types was what I'm trying. The
problem is most built in functions seem to hit a limit when converting
between various datatypes. Pick a large enough number and try.

Other variations I tried:
(= (string-to-int (concat (number-to-string 1109546122) ".0")) (float-time 
'(16930 21642)))

Any help appreciated. Thanks.

Balaji

-- 
Remember 2 + 2 = 5, for large values of 2
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to