httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dedeco Balaco <dedeco.bal...@yahoo.com.INVALID>
Subject [users@httpd] (rewritten) In directory pages, how to show file dates in a specific timezone?
Date Thu, 17 May 2018 19:46:00 GMT
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message