NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Linux v
1 2 3 4 5 … 34 Next »
DateTime format in web UI

 
  • 0 Vote(s) - 0 Average
DateTime format in web UI
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#1
2025-02-10, 08:52 AM (This post was last modified: 2025-02-10, 08:55 AM by janoonk.)
Hi,

just upgraded to v7.0.1.241229 on my Synology NAS DS720+ with DSM v7.2.2 running inside a docker container and using HDHomeRun EXPAND (4 tuners) HDHR5-4DC Firmware Version 20231214.
Works like a charm! Thanks. Just donated again btw for your excellent software I already have been using for years!

But the question I have is how to change the datetime format. See screenshot.
Instead of 2/10/2025 I want 10/2/2025.

I did set the Timezone:
      {
        "key" : "TZ",
        "value" : "Europe/Amsterdam"
      }
and mount volume (necessary??):
      {
        "host_volume_file" : "/docker/zoneinfo",
        "is_directory" : true,
        "mount_point" : "/usr/share/zoneinfo",
        "type" : "ro"
      }

I attached the .json Docker Container Manager settings. For people who actually want to use it be sure to update:
-"host_volume_file" host folders to your situation.
-TZ key timezone information
-HOST_IP key which points to your device running nextpvr

After that just goto DSM > Container Manager > Action > Import > choose .json settings file


Attached Files Thumbnail(s)
   
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,079
Threads: 957
Joined: May 2006
#2
2025-02-10, 01:20 PM
Some setting are controlled by the server and some by the browser two environment variables you need to research would be LC_TIME=... and LANG=... I would start with nl_NL and see

The logs on startup show the format to confirm you are setting them correctly.

Martin
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#3
2025-02-10, 02:56 PM (This post was last modified: 2025-02-10, 03:27 PM by janoonk.)
Well tried these settings (every time first stop, delete, import using new .json settings):
{
"key": "LC_TIME",
"value": "nl_NL.UTF-8 date +%X"
},
{
"key": "LANG",
"value": "nl_NL.UTF-8 date +%X"
}

and

{
"key": "LC_TIME",
"value": "nl_NL.UTF-8"
},
{
"key": "LANG",
"value": "nl_NL.UTF-8"
}

and

{
"key": "LC_TIME",
"value": "nl_NL"
},
{
"key": "LANG",
"value": "nl_NL"
}

I searched inside (used the log button) .zip file but only found:
2025-02-10 15:54:39.859 [DEBUG][1] With environment: LD_LIBRARY_PATH=/app/DeviceHost/x64:

Searched for LC_TIME, LANG but none found. What do I need to look for? Its quite big.

After a while a Verbose logging button appeared. Tried that one and restarted container but same result.

I am using Firefox which is set to English but I am Dutch but I still want to use my regional date/format settings like dd/mm/yyyy.
I did find Firefox datetime settings. I checked the "Use your operating system settings...." and restarted FF but still same issue.

I also updated Regional format in Windows Settings and restarted FF. Still same issue.
NextPVR interface language is set to Default.

I even restart whole client system (Windows 11) and again Container on server.
Also tried Edge.


Attached Files Thumbnail(s)
           
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,079
Threads: 957
Joined: May 2006
#4
2025-02-10, 03:56 PM
Sorry I can't help further. I forgot those setting are mainly for UI clients (that's where there is the extra logging is), not sure how or if the web API is regionalized. That particular example looks like a formatted string with more that just date info.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#5
2025-02-10, 07:23 PM
These dates/times shown in the browser use toLocaleDateString() and toLocaleTimeString() and your browser takes care of formatting based on your settings. (ie, no NextPVR settings or windows settings that effect this)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#6
2025-02-10, 07:25 PM
With Chrome, it sounds like it's changed with Settings > Advanced Settings > Language, and the format is inferred from the language + country choice, for instance:

English (US) sets date format to mm/dd/yyyy
English (UK) sets date format to dd/mm/yyyy
etc

I did read that you need to restart your browser after changing these settings though.
janoonk
Offline

Member

Netherlands
Posts: 105
Threads: 33
Joined: Dec 2020
#7
2025-02-10, 07:56 PM (This post was last modified: 2025-02-10, 08:07 PM by janoonk.)
(2025-02-10, 07:25 PM)sub Wrote: With Chrome, it sounds like it's changed with Settings > Advanced Settings > Language, and the format is inferred from the language + country choice, for instance:

English (US) sets date format to mm/dd/yyyy
English (UK) sets date format to dd/mm/yyyy
etc

I did read that you need to restart your browser after changing these settings though.


I fixed it for Chrome by changing English (US) to English (UK).

For Firefox its a bit more difficult:
Settings > General > Language >
  Choose the languages used to display menus, messages, and notifications from Firefox > English (GB)
  Choose your preferred language for displaying pages > English (United Kingdom) (en-gb)

For Edge
  Settings > Languages > Add languages > English (United Kingdom)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,772
Threads: 769
Joined: Nov 2003
#8
2025-02-10, 08:07 PM
Great - glad you got it sorted.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode