Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for time_proc, methods like date_time should return time in UTC #28

Closed
wants to merge 1 commit into from
Closed

Conversation

mshytikov
Copy link

According to http://www.exif.org/Exif2-2.PDF
UTC is not obligatory from the spec but this should help to avoid problem with time zones .

According to http://www.exif.org/Exif2-2.PDF
UTC is not obligatory from the spec but this 
should help to avoid problem with time zones .
@remvee
Copy link
Owner

remvee commented Jun 3, 2012

I don't agree, it will introduce more time zone problems because more
than 90% of the camera's have their clock set to local time and users of
this module will most likely have their computer setup in the same
zone. Converting the timestamps of their photo's to UTC will introduce
the extra zone offset.

But I do agree it's a nuisance. Ruby doesn't make it very easy to
handle time zones well. ActiveSupport together with TZInfo do a nice
job but I can't find a way to take advantage of that without depending
on them.

A proper solution is to allow passing in tz information for mktime
either via a thread local or an options map at JPEG and TIFF
initialization and falling back to the current behaviour. That's a pull
request I will consider.

2012/06/02 23:01, mshytikov:

According to http://www.exif.org/Exif2-2.PDF
UTC is not obligatory from the spec but this should help to avoid problem with time zones .

You can merge this Pull Request by running:

git pull https://github.com/mshytikov/exifr master

Or you can view, comment on it, or merge it online at:

#28

-- Commit Summary --

  • fix for time_proc, time should be in UTC

-- File Changes --

M lib/exifr/tiff.rb (2)
M tests/jpeg_test.rb (7)

-- Patch Links --

https://github.com/remvee/exifr/pull/28.patch
https://github.com/remvee/exifr/pull/28.diff


Reply to this email directly or view it on GitHub:
#28

@remvee remvee closed this Jun 3, 2012
@remvee remvee mentioned this pull request Jul 20, 2012
@remvee
Copy link
Owner

remvee commented Sep 30, 2014

See bbd6e89 for a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants