Skip to content

Commit

Permalink
Fix algorithm to get exif "Date and Time" attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
tach committed Jun 9, 2009
1 parent 9af3abc commit 2049d85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ rbphoto (0.2.1) unstable; urgency=low
* Check GUI availability and fallback to CUI mode
* Add -a (--all) option
- set all recommended options; same as -DmM
* Fix algorithm to get exif "Date and Time" attribute

-- Taku YASUI <[email protected]> Mon, 08 Jun 2009 22:47:16 +0900
-- Taku YASUI <[email protected]> Wed, 10 Jun 2009 00:13:27 +0900

rbphoto (0.2.0) unstable; urgency=low

Expand Down
7 changes: 5 additions & 2 deletions lib/rbphoto/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@

class Exif
def datetime
self.each_entry do |name, value|
return value if name.match(/^Date and Time/)
[' (original)', ' (digitized)', ''].each do |suf|
val = self['Date and Time' + suf]
val && val.match(/^\d+:\d+:\d+ \d+:\d+:\d+$/) or next
return val
end
return false
end
end

Expand Down

0 comments on commit 2049d85

Please sign in to comment.