Opened 4 months ago

Last modified 4 months ago

#18015 new defect

JOSM displays unexpected EXIF time, maybe due to wrongly considering the user's timezone

Reported by: skorbut Owned by: team
Priority: normal Milestone:
Component: Core image mapping Version:
Keywords: template_report exif Cc: StephaneP


What steps will reproduce the problem?

  1. Open the attached image
  2. Look at the JOSM window titled "Geotagged Images"
  3. Look at the upper left corner, at the line starting with "EXIF time"

What is the expected result?

The line should read 2019-07-19 13:14:08.985, which is also the value that exiftool prints for the "Date/Time Original" EXIF field.

What happens instead?

The line reads 2019-07-19 15:14:08.985 instead, i.e. it differs 2 hours from the value stored in the EXIF field.

My hypothesis is that JOSM adds two hours (=my offset to UTC timezone) to the "Date/Time Original" EXIF value. (Small note: I manually edited the "Date/Time Original" EXIF value to be sure which exact value is read. Other candidates would have been "GPS Date/Time", "Create Date", "Modify Date").

Please provide any additional information below. Attach a screenshot if possible.

Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-08-05 20:49:54 +0200 (Mon, 05 Aug 2019)
Build-Date:2019-08-06 01:30:53
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15283 en) Linux Ubuntu 16.04.6 LTS
Memory Usage: 1495 MB / 3641 MB (292 MB allocated, but free)
Java version: 1.8.0_222-8u222-b10-1ubuntu1~16.04.1-b10, Private Build, OpenJDK 64-Bit Server VM
Screen: :0.0 2560x1440
Maximum Screen Size: 2560x1440
fonts-noto: fonts-noto:all-20160116-1
Dataset consistency test: No problems found

+ apache-commons (34908)
+ editgpx (34908)
+ photo_geotagging (34908)
+ photoadjust (34977)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- E: Error reading EXIF from file: com.drew.metadata.MetadataException: Tag 'GPS Latitude' has not been set -- check using containsTag() first
- E: Error reading EXIF from file: com.drew.metadata.MetadataException: Tag 'GPS Latitude' has not been set -- check using containsTag() first
- W: Region [geoimage-thumbnails_BLOCK_v2] Resetting cache
- W: Region [WMTS_BLOCK_v2] Resetting cache

Attachments (1)

img013255.jpg (1.3 MB) - added by skorbut 4 months ago.

Download all attachments as: .zip

Change History (4)

Changed 4 months ago by skorbut

Attachment: img013255.jpg added

comment:1 Changed 4 months ago by Don-vip

Cc: StephaneP added
Keywords: exif added

I don't remember how we globally display times for image mapping. Do we always display UTC times?

comment:2 Changed 4 months ago by StephaneP

I've already see some strange behavior with the image's timestamp when I use my scripts and Josm, but I had never investigate.
I just tested on Windows and Ubuntu. Josm seems to add the timezone offset to the exif timestamp.
As Exif metadata usually doesn't store any timezone data, I don't see any real value to add the local time offset.

comment:3 Changed 4 months ago by skorbut

In my opinion, since the field is titled EXIF time, there shouldn't be any conversion applied to its value.

Alternatively, there could be an additional field called EXIF time (converted to UTC) (or similar).

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to skorbut
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.