osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [users@httpd] (rewritten) In directory pages, how to show file dates in a specific timezone?


Is my question outside the scope of this list?

Does my question needs to explain more details about my problem?

It has been waiting some help for almost 30 days, which seem to be unusual in this list. In this time, I have seen several questions being immediately or very quickly answered, which make me wonder what is wrong with mine.


Em 17-05-2018 16:46, Dedeco Balaco escreveu:
Hello,

I could not find a way to show file listing pages (generated by Apache)
with times in the correct timezone. The timezone is defined in the
environment, but Apache refuses to take it into account (assuming that
what I set it what should be set).

To detail the situation a bit more: a Debian 9 server with Apache 2.4; a
normal user account; a working ~/public_html folder for public web content.

Dates and times are correctly shown in SSH accesses to the server, made
by me. Although the server is in a different timezone, the command ls
(and others) use the TZ variable where timezone is needed, showing times
as if here. This is not related to Apache, but seem important (to
compare). If the server uses Bios times or anything, it does not matter
(my guess), since we can choose our timezone as needed, with the TZ
environment variable.

For the system I shortly defined, imagine these steps:

1. Access the server with SSH

2. Create a new folder in ~/public_html with the command:

    mkdir ~/public_html/nf

3. Create one file in that folder with the command

    echo "arquivo" > ~/public_html/nf/arquivo.txt

4. Show that folder content (one file) to someone, with the public URL:

    http://user.server.fi/nf

    This page will be created by Apache 2.4. But it shows time in
server's clock (or timezone, I am not sure, and it should not matter, I
think, as long as it consider the timezone I want, somehow).

My user environment has the variable TZ set to my timezone, as said. We
can confirm that exists in the web environment for each user, using
phpinfo() function in any served PHP script.

Since Apache does not seem to consider the TZ variable to choose the
timezone to show file metadata, how should I do it?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx