Giter Site home page Giter Site logo

Comments (2)

bright-tools avatar bright-tools commented on September 26, 2024

Investigation suggests that:

  1. The application currently uses MediaStore.Images.Media.DATE_MODIFIED to determine the timestamp at which an image was last modified
  2. This field is populated by the Android MediaScanner based on the information in the image's EXIF block
  3. The image in the EXIF block does not have a timezone associated with it
  4. The Android MediaScanner re-scans the external SD card when it is re-mounted

Due to this, it seems that each time the image is processed by the MediaScanner, the date information is extracted from the EXIF and converted to Epoch time based on the current timezone. If the timezone has changed since the image being taken (or has shifted due to DST), this means that the calculated Epoch time will be different (e.g. the Epoch time of 13:01:01 on Jan 1st 2015 will be calculated differently for a phone set to GMT as compared to a phone set to CET).

The solution would seem to be to use the file's timestamp rather than the data from the MediaStore/EXIF.

from androidphotobackup.

bright-tools avatar bright-tools commented on September 26, 2024

Unfortunately getting the time from the filestamp doesn't work in a reliable way in the case that the SDcard is FAT formatted. FAT timestamps are interpreted as being in 'local time' (unless various mount options are used to change that, such as tz or time_offset). This means that rebooting the unit after the timezone has changed will result in the timestamp of all files on the SDcard seeming to change, referenced to the new timezone.

from androidphotobackup.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.