Setting the time zone

When using FileRun with a webhosting service, sometimes the server is located in a different time zone than you and your users. You can adjust the time difference by either configuring PHP with a different timezone, or configuring just the FileRun installation to use your time zone.

For configuring PHP, please see this page for information on what to change in your php.ini file: https://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone

You can also configure just FileRun rather than PHP, by adding the following line inside the custom configuration file:

 1date_default_timezone_set("Asia/Tokyo");

Replace Asia/Tokyo with your desired location. You can find here a list of available timezone codes for various locations on the planet: https://www.php.net/manual/en/timezones.php

If you want to change also the date/time formats used in the interface, these can be changed by editing the language translation files (See Translating_FileRun).

To make sure your timezone is set correctly, simply upload a file or create a new folder and look at the item's Created hour.

Setting the database time zone

Although the filesystem operations now show the correct time, database-related information, such as file comments, or user activity logs can show a different time, if the MySQL database is configured with a different time zone.

Change the MySQL server's timezone: https://dev.mysql.com/doc/refman/8.4/en/time-zone-support.html

Via Docker

You can adjust the timezone for both the FileRun and the MySQL/MariaDB containers easily, by adding an environmental variable TZ.

Example snippet when launching FileRun via Docker Compose:

 1    db:
 2        image: mariadb:12.2
 3        environment:
 4            TZ: 'America/Los_Angeles'
 5    web:
 6        image: filerun/filerun
 7        environment:
 8            TZ: 'America/Los_Angeles'