-
-
Save JensTimmerman/c90685e3cb5fb022f3ffdc91292acec1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gitmtime | |
# find file extension | |
filepath=@item[:content_filename] | |
str=`git -1 log --format='%ci' -- #{filepath}` | |
# puts '#############' | |
# puts "item #{filepath}" | |
# puts "str #{str}" | |
# puts '#############' | |
if str == "" | |
return @item.mtime | |
else | |
return DateTime.parse( str ) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment