Handling of UTC time offsets in dc:date

Hello, I use Tropy to tag and organise photos, and I am having trouble making sense of how to work with timezones. I have read this discussion from 2019 and I’m a bit confused. I appreciate that timezones are the bane of developers, so do forgive me.

I am using version 1.17.3 (x64) installed via Flatpak on Linux Mint 22.2

My local timezone is UTC+10, so if I enter 2026-10-14T00:00+00:00 (or 2026-10-14T00:00Z), then it displays as Oct 14, 2026, 10:00 AM. If I change my timezone to UTC+2 and then restart Tropy, it changes to display as Oct 14, 2026, 2:00 AM. I believe this is correct.

However, when it comes to timezones other than UTC, I am either misunderstanding how to read these timestamps, or Tropy is doing something wrong with handling them.

If I am back on my home UTC+10, and I enter 2026-10-14T02:00+02:00, it displays as Oct 14, 2026, 2:00 PM; or if I enter 2026-10-14T10:00+10:00, it displays as Oct 15, 2026, 6:00 AM. I would believe they should both display as Oct 14, 2026, 10am as well, since they are the same time as 2026-10-14T00:00+00:00 (see attached photo).

Another way I have tried to make sense of this is to copy and paste the ISO 8601 timestamps on the Wikipedia page. At time of writing, the three times shown are 2026-10-13T16:18:49-12:00, 2026-10-14T04:18:49+00:00, and 2026-10-14T16:18:49+12:00. My understanding is that these are all the same time, and should all display as Oct 14, 2026, 2:18 PM. However, when copying these times into Tropy, only the +00:00 timestamp displays as Oct 14, 2026, 2:18 PM. 2026-10-13T16:18:49-12:00 displays as Oct 13, 2026, 2:18 PM; and 2026-10-13T16:18:49-12:00 displays as Oct 15, 2026, 2:18 PM.

I feel like Tropy is going the wrong direction with the timezones. The +00:00 timezone displays 10 hours later than the specified time, because I am UTC+10. The +12:00 timezone displays +22 hours than the specified time, but I think it should display -2 hours instead. Similarly, the -12:00 timezone displays -2 hours than the specified time, but I think it should display +22 hours the specified time.

If I flip the +/- signs in the first example, for instance (i.e. -02:00 instead of +02:00), they all appear as Oct 14, 2026, 10:00 AM as I would expect them to.

The description on the Wikipedia page also supports my understanding of Tropy handling this back to front.

A negative UTC offset describes a time zone west of the prime meridian where the civil time is behind UTC. So the zone designation for New York (on standard time) would be “−05:00”, “−0500”, or “−05”. Conversely, a positive UTC offset describes a time zone east of the prime meridian where the civil time is ahead of UTC. So the zone designation for Cairo will be “+02:00”, “+0200”, or “+02”.

Thank you for your time to read this

Hi, thanks for the detailed report — you’re right, this is a bug. The date library used by Tropy applied the UTC offset in the wrong direction when parsing timestamps. It will be fixed in the next release. Note that in the next release, timestamps with an explicit offset are displayed in that offset (e.g. “Oct 14, 2026, 2:00 AM GMT+2”) rather than converted to your local time; timestamps in UTC (Z) are still shown in local time.

1 Like

There were a couple of different timezone issues: there was one converting EXIF dates with embedded offsets correctly. This happens during importing, so in these cases the date values need to be changed (or the photo imported again).

For the case here it’s different, the dates were already entered correctly, only displayed wrong: these will just look right in 1.18 and you don’t have to change anything.

Regarding, showing everything in local time, yes that’s possible. In fact, we could easily add this into the 1.18 release if that’s something that would be useful. To be clear, date/times without a timezone are already displayed in your local timezone. What you’re asking for is a preference to display times with a timezone (that’s not yours) in your timezone?

Thank you for looking into the timezone issue. It appears to now be displaying correctly in 1.18.0-beta.7

However, when using column view, it appears to not be taking the timezone into account when sorting chronologically.

I made a small example here. When sorting oldest first, it shows: 08:10+10 (22:10 UTC), 08:15+10 (22:15 UTC), 09:00+11 (22:00 UTC), and 09:05+11 (22:05 UTC). However, I would believe that it should sort by the real time order, i.e. 09:00+11 (22:00 UTC), 09:05+11 (22:05 UTC), 08:10+10 (22:10 UTC), and 08:15+10 (22:15 UTC).

Would it also be possible to have an option to disable showing the seconds? Since 1.17.3 also did not show the seconds

Thank you again

You’re right, what’s being sorted are the actual input values (the date strings) and not the parsed dates. It’s tempting to solve this by comparing the parsed dates instead, but I’m not sure we can do that because of the generic nature of these values. For the dc:title column we can probably assume most values will actually be dates, but it’s not clear how we can decide which column should sort as a date and which shouldn’t. It’s tricky, but we’ll take it into consideration as an option going forward.

Out of curiosity, if you’re comparing time across time zones, is there a reason why you’re not converting them all to UTC (or another single time zone)? If the original time zone is important you could split it into two columns (one for each or one normalized and one with just the offset).

For the display option: yes, we could make this completely configurable. The only question is how much control to expose (the more, the more complicated the configuration). Time precision would be one thing (like: show seconds? show milliseconds?) and for the date another: short, long, no months? How much control would you need?

I don’t need to use local time rather than UTC; that’s just my personal pedantic preference. I can put the UTC date and time in an additional field and sort by that instead as a workaround.

The current behaviour with display options is that there are different ‘tiers’ of accuracy or specificity. If a year is specified but no month is specified, then the item sorts as if it was January, but only the year is displayed. If no day is specified, the item sorts as the 1st of that month, but only the month and year are displayed. If no HH:MM is specified, the item sorts as 00:00, but only the date is shown. Seconds can be input but they do not display at all in 1.17.3

To me, seconds are a different ‘tier’ to hours and minutes. You wouldn’t really use hours and minutes without the other, but seconds are omittable in my opinion. I believe it should behave the same as the other ‘tiers’ — to not be displayed unless a value is specified by the user

To allow the maximum possible customisation, you could implement something standard for users such as GLib DateTime, but this isn’t something I’m explicitly looking for. I would just like to continue seeing my times without seconds. Thank you again

Good point about seconds: showing them only if they are given in the input and hiding them otherwise seems like the best default behavior. We’ll do that!

1 Like