Hello,

I'm running 'fossil serve' on a FreeBSD system in EST time zone. If I
start the process as root, the Timeline setup page tells me that "On
this server, local time is currently the same as UTC," which is
incorrect. If I start the process as some other user, such as www,
then I get the correct -5 hour difference.

The problem seems to be the chroot mechanism, which is only enabled
for root. When a worker chroots to the repository location (e.g.
/fossil), it loses access to /etc/localtime and /usr/share/zoneinfo/.
This prevents SQLite from correctly detecting the current time zone.

I got around the problem by doing a read-only nullfs mount from
/usr/share/zoneinfo to /fossil/usr/share/zoneinfo, and then creating a
symlink from ../usr/share/zoneinfo/America/New_York to
/fossil/etc/localtime. In my case, /fossil is a separate file system,
so I had to go through nullfs to avoid copying all the files and then
forgetting to keep them updated.

Just posting this for anyone else that runs into the same problem. Is
there a simpler solution that would allow SQLite to correctly detect
the time zone in a chroot?

- Max
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to