pictures taken with camera have wrong timestamp
Bug #1371390 reported by
Bill Filler
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtubuntu-camera (Ubuntu) |
Fix Released
|
High
|
Ugo Riboni | ||
qtubuntu-camera (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
krillin rtm build 46
- phone is set for Eastern time zone (utc -4)
- take a picture with the camera
- apt-get install exiv2 onto the phone
- cd ~/Pictures/
- exiv2 <imagename>.jpg
Expected results:
Image Timestamp in meta data should match the local time on the phone, with TZ offset applied
Actual results:
Image Timestamp is 6 hours ahead of my timezone
The problem with this is the gallery app uses the timestamps found in the exiv data to display events, so a photos are showing up on the incorrect day
Related branches
lp:~phablet-team/qtubuntu-camera/fix-exif-timestamp
- PS Jenkins bot: Approve (continuous-integration)
- Jim Hodapp (community): Approve (code)
-
Diff: 355 lines (+222/-17)8 files modifieddebian/control (+2/-1)
src/aalimagecapturecontrol.cpp (+64/-16)
src/aalimagecapturecontrol.h (+2/-0)
src/src.pro (+3/-0)
unittests/aalimagecapturecontrol/aalimagecapturecontrol.pro (+3/-0)
unittests/aalimagecapturecontrol/data_noexifjpeg.h (+63/-0)
unittests/aalimagecapturecontrol/data_validjpeg.h (+64/-0)
unittests/aalimagecapturecontrol/tst_aalimagecapturecontrol.cpp (+21/-0)
tags: | added: rtm14 |
Changed in qtubuntu-camera (Ubuntu): | |
importance: | Undecided → High |
assignee: | nobody → Ugo Riboni (uriboni) |
Changed in qtubuntu-camera (Ubuntu): | |
status: | New → In Progress |
no longer affects: | qtubuntu-camera |
no longer affects: | systemd |
Changed in qtubuntu-camera (Ubuntu): | |
status: | In Progress → Fix Released |
To post a comment you must log in.
The problem is caused by the timezone setting being different at the android layer and at the ubuntu layer. The android layer seems to always use the UTC tz, and that is what it writes in the EXIF tags when it returns the encoded jpeg data to libhybris.
The attached branch fixes the problem by updating the EXIF tags with the correct timestamps in qtubuntu-camera, before saving the image to disk and notifying the apps.
However according to ogra there might be a way to fix this by making sure we set the tz in android too when we set it in ubuntu. ubuntu- phablet: ~$ sudo lxc-console -t0 -nandroid sys.timezone Europe/Berlin
<ogra_> phablet@
<ogra_> root@mako:/ # date
<ogra_> Wed Sep 24 10:51:11 GMT 2014
<ogra_> root@mako:/ # setprop persist.
<ogra_> root@mako:/ # date
<ogra_> Wed Sep 24 12:52:15 CEST 2014
<ogra_> seems it uses the same notation
<ogra_> (but to verify 100% one would likely need to check the source of bionic or so )
The tz names in bionic are as follows: https:/ /gist.github. com/arpit/ 1035596