Skip to content

Spotlight's "Last opened" metadata set to arbitrary date and time #3137

Description

@haihige

Describe the bug

I'm noticing some odd behavior with the "Last opened" timestamp, where it gets updated since the feature was implemented for #2258 (thank you NJRoadfan!), but the dates and times are wrong. For example, all of these were opened on 2026-05-18 at around 20:15 (technically before 4.5.0 was officially released, but this is still present in 4.5.0):

  1. Directory 1, file.txt: 2026-03-23 10:55
  2. Directory 1, file.png: 2026-04-27 21:05
  3. Directory 2, file.gif: 2026-03-23 12:05
  4. Drive root, file.txt: doesn't update on file open.

When I disconnect and reconnect to the server, the first time I select one of these files, Finder shows the "Last opened" date that was previously there (normally the same as the "Last modified" date). The second time I select it, it shows the new arbitrary time. Note that this is selecting, not opening.

To Reproduce

Build with Spotlight support, set spotlight = yes in afp.conf, and open some files (but don't modify and save them).

Expected behavior

The last opened date and time should be the correct day and time that the file was opened.

Environment

  • Server OS: FreeBSD 14.4 (running in a jail)
  • Client OS: Mac OS X Snow Leopard 10.6.8
  • Netatalk Version: 4.5.0

Configuration

afp.conf:

[Global]
server name = AFPdev
afp interfaces = epair0b
log level = default:warn
log file = /var/log/afpd.log
mimic model = RackMac
zeroconf = yes
afpstats = yes
spotlight = yes
cnid scheme = sqlite

[data]
path = /mnt/data
valid users = haihige

Logs

Attach syslogs from the malfunctioning process, maxdebug log level

Which process I should set the log level up for?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions