I am trying to do a comparison of files based on their last modified date.
I am pulling the first file from a webapp folder using curl.
curl --silent -I http://localhost:8023/conf/log4j2.xml | grep Last
Last-Modified: Tue, 22 Mar 2016 22:02:18 GMT
The second file is on local disk.
stat /var/tmp/log4j2.xml | grep Modify | awk '{print $2" "$3}' | cut -d'.' -f1
2016-03-24 13:56:51
Is there a mechanism to convert the times ? So that I can then compare the two times and take an action accordingly.