Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Date Incorrect #163

Open
clay584 opened this issue Nov 27, 2023 · 0 comments
Open

File Date Incorrect #163

clay584 opened this issue Nov 27, 2023 · 0 comments

Comments

@clay584
Copy link

clay584 commented Nov 27, 2023

When not in daylight savings time, and displaying the date format as %B %e, %Y @ %l:%M %p, all times show 1 hour later.

This results in two issues:

  1. The file creation times do not align with the actual local time in which they were created.
  2. If you create a file after 23:00 local time, the timestamp displays as today's date and a time of 12:XX PM. It should display tomorrow's date, at 12:XX AM. If the first issue was corrected, then this would likely not happen.

As a concrete example:

File creation time (server's local time): November 26, 2023 @ 11:08 PM
Current time when browsing to the server (server and client's local time): November 26, 2023 @ 11:15 PM
File date displayed in browser: November 26, 2023 @ 12:08 PM
What should be displayed in browser: November 26, 2023 @ 11:08 PM

nginx configuration:

server {
    listen 80;
    server_name print-server;

    types {
        # Specify MIME type for .log files
        text/plain log;
        # Ensuring PDF files are served correctly
        application/pdf pdf;
    }

    location / {
        alias /data/cifs/;
        fancyindex on;
        fancyindex_exact_size off;
        fancyindex_time_format "%B %e, %Y @ %l:%M %p";
        fancyindex_localtime on;
        fancyindex_default_sort date;
        fancyindex_directories_first on;
    }
}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant