pictures taken with camera have wrong timestamp

Bug #1371390 reported by Bill Filler
14
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/com.ubuntu.camera
- 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

Tags: rtm14

Related branches

Bill Filler (bfiller)
tags: added: rtm14
Changed in qtubuntu-camera (Ubuntu):
importance: Undecided → High
assignee: nobody → Ugo Riboni (uriboni)
Ugo Riboni (uriboni)
Changed in qtubuntu-camera (Ubuntu):
status: New → In Progress
Revision history for this message
Ugo Riboni (uriboni) wrote :

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.
<ogra_> phablet@ubuntu-phablet:~$ sudo lxc-console -t0 -nandroid
<ogra_> root@mako:/ # date
<ogra_> Wed Sep 24 10:51:11 GMT 2014
<ogra_> root@mako:/ # setprop persist.sys.timezone Europe/Berlin
<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

Ugo Riboni (uriboni)
no longer affects: qtubuntu-camera
Ugo Riboni (uriboni)
no longer affects: systemd
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtubuntu-camera - 0.3.3+14.10.20141001-0ubuntu1

---------------
qtubuntu-camera (0.3.3+14.10.20141001-0ubuntu1) 14.09; urgency=low

  [ Ubuntu daily release ]
  * New rebuild forced

  [ Ugo Riboni ]
  * Fix EXIF timestamp before saving JPEG, so that timestamps are in
    local times and not in UTC (LP: #1371390)
 -- Ubuntu daily release <email address hidden> Wed, 01 Oct 2014 22:23:52 +0000

Changed in qtubuntu-camera (Ubuntu RTM):
status: New → Fix Released
Ugo Riboni (uriboni)
Changed in qtubuntu-camera (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.