Feature Request: fancyindex_time_format timezone support
cinderblock opened this issue · 1 comments
cinderblock commented
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:
- Support
%Z
option ofstrftime
(and maybe%z
) - Serve page with GMT time and convert to local time with Javascript on client browser
- Button to let viewers select which time zone they want to use and stored in a cookie
ryandesign commented
- Support
%Z
option ofstrftime
(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
.
- Serve page with GMT time and convert to local time with Javascript on client browser
- 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.