nextcloud / nextcloud/server

Feature Request: Preserve or Modify Folder “Last Modified” Timestamps During Sync and Upload

Open
#59,684 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement hotspot: file time handling
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

[!TIP]

Help move this idea forward
  • Use the 👍 reaction to show support for this feature.
  • Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
  • Subscribe to receive notifications about status changes and new comments.

Is your feature request related to a problem? Please describe.

Yes. I am trying to migrate years of data from another cloud drive into Nextcloud.
File timestamps are preserved correctly, but folder “Last Modified” timestamps are always overwritten during sync or upload. This destroys the chronological structure of my archive.

This is the only deal-breaker preventing me from fully migrating to Nextcloud.
Without folder timestamp preservation, I lose important historical information about my data.

I am aware of issue #15192, but it discusses timestamp inconsistencies in general and focuses mostly on files. It does not address the specific need to preserve or modify folder timestamps.


Describe the solution you'd like

I would like Nextcloud to support one or both of the following:

  1. Preserve folder “Last Modified” timestamps during sync
    When the desktop client uploads a folder, it should send the folder’s original modification time to the server, just like it already does for files.

  2. Allow modifying folder timestamps via API or WebDAV
    If direct preservation is not possible, an API endpoint or WebDAV extension would allow migration tools to restore folder timestamps after upload.

Either solution would make it possible to migrate long‑standing folder structures without losing their historical context.


Describe alternatives you've considered

  • Accepting timestamp loss — not viable for archival or chronological workflows.
  • Storing timestamps in metadata files — possible but impractical and breaks the natural folder view.
  • Using ZIP/TAR archives — preserves timestamps internally but defeats the purpose of cloud file access.
  • Using other cloud services — some preserve folder timestamps, but I would prefer to use Nextcloud.

None of these alternatives solve the core problem: Nextcloud does not store or sync folder timestamps at all.


Additional context

Folder timestamps are meaningful in many workflows:

  • Tracking when a project folder was last updated
  • Maintaining chronological order of archives
  • Preserving historical structure during migration
  • Ensuring consistency with other cloud services (Google Drive, OneDrive, Icedrive, etc.)

Nextcloud already preserves file timestamps perfectly.
Adding folder timestamp preservation would make Nextcloud a complete solution for users migrating large, long‑term archives.

Thank you for considering this enhancement.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the server-side WebDAV and upload handling for directories, then determine whether folder timestamps can be stored and exposed through the requested API or WebDAV behavior. Done should include an agreed preservation or modification path, coverage for sync and upload, and tests for folder timestamps.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.