How to ignore remote file timestamp in aria2?

When downloading files using the command-line utility aria2, the program automatically attempts to preserve the remote file’s modification time and apply it to your local file. This quick overview explains how to override this behavior, the specific command-line option required to force aria2 to use the current local time instead, and how to make this change permanent through a configuration file.

The Command-Line Solution

By default, aria2 retrieves the timestamp from the server’s response headers (like Last-Modified) and updates the downloaded file’s metadata accordingly. To instruct aria2 to ignore this remote timestamp and instead use the exact time the file was created on your local system, you must use the --remote-time option set to false.

The exact syntax for your terminal is:

aria2c --remote-time=false [URL]

For example, if you are downloading a Linux distribution ISO and want the local file to reflect the time you actually downloaded it, you would run:

aria2c --remote-time=false https://example.com/file.iso

Making the Setting Permanent

If you prefer that aria2 always ignores remote timestamps without having to type the flag every time, you can add this preference to your aria2 configuration file (typically named aria2.conf).

  1. Locate or create your aria2.conf file (usually found in ~/.config/aria2/aria2.conf on Linux/macOS or the same directory as the executable on Windows).
  2. Add the following line to the file:

remote-time=false

Once saved, aria2 will automatically apply this rule to all future download sessions.