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

Feature Request: fancyindex_time_format timezone support #123

Open
cinderblock opened this issue Jan 2, 2021 · 1 comment
Open

Feature Request: fancyindex_time_format timezone support #123

cinderblock opened this issue Jan 2, 2021 · 1 comment

Comments

@cinderblock
Copy link

I think this awesome module deserves a couple more functions relating to time, specifically around displaying time in non GMT zones.

Some ideas that I think would be nice to implement, in order of presumed simplicity of implementation:

  1. Support %Z option of strftime (and maybe %z)
  2. Serve page with GMT time and convert to local time with Javascript on client browser
  3. Button to let viewers select which time zone they want to use and stored in a cookie
@ryandesign
Copy link
Contributor

  1. Support %Z option of strftime (and maybe %z)

Seems like that would be possible, although this information is not available on all platforms. nginx has a feature test for it and defines NGX_HAVE_GMTOFF if the information is available.

%z (the hour and minute offset from UTC) is in tm_gmtoff while %Z (the timezone or name or abbreviation) is in tm_zone.

  1. Serve page with GMT time and convert to local time with Javascript on client browser
  2. Button to let viewers select which time zone they want to use and stored in a cookie

ngx-fancyindex already gives you everything you need to write the HTML, CSS, and JavaScript to do these things.

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

2 participants