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

Header date/time uses UK locale for format #954

Open
5 of 7 tasks
eagle79 opened this issue Jan 13, 2025 · 2 comments
Open
5 of 7 tasks

Header date/time uses UK locale for format #954

eagle79 opened this issue Jan 13, 2025 · 2 comments
Labels
Feature request➕ New feature or request next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed.

Comments

@eagle79
Copy link

eagle79 commented Jan 13, 2025

Is there an existing issue for this?

The issue occurs in the following browsers. Select at least 2.

  • Firefox
  • Chrome
  • Edge
  • Safari (unsupported) - PRs welcome
  • N/A - This is an issue with the backend

Current Behavior

I'm unsure if this is a bug or a feature request: The header uses a UK date format (D/M/YYYY), which can be confusing for us odd Americans (where we use M/D/YYYY).

This appears to be hard-coded (see /front/php/templates/header.php, line 123), though I'm not particularly familiar with Date.toLocaleString().

Expected Behavior

Either use a locale based on the server TZ value, or use and ISO 8601 styled date format (YYYY-M-D) as appears to be common throughout the rest of the UI

Steps To Reproduce

  1. Log in.
  2. Look at the date/time in the header.

app.conf

#-----------------AUTOGENERATED FILE-----------------#
#                                                    #
#         Generated:  2025-01-11_14-50-22            #
#                                                    #
#   Config file for the LAN intruder detection app:  #
#      https://github.com/jokob-sk/NetAlertX         #
#                                                    #
#-----------------AUTOGENERATED FILE-----------------#


# General
#---------------------------
LOADED_PLUGINS=['ARPSCAN','CSVBCKP','DBCLNP','INTRNT','MAINT','NEWDEV','NSLOOKUP','NTFPRCS','AVAHISCAN','SETPWD','SMTP','SYNC','VNDRPDT','WORKFLOWS','UI','CUSTPROP','TELEGRAM']
LOADED_PLUGINS__metadata="{}"
DISCOVER_PLUGINS=True
DISCOVER_PLUGINS__metadata="{}"
SCAN_SUBNETS=['192.168.1.0/24 --interface=wlan0']
SCAN_SUBNETS__metadata="{}"
LOG_LEVEL='verbose'
LOG_LEVEL__metadata="{}"
TIMEZONE='America/New_York'
TIMEZONE__metadata="{}"
PLUGINS_KEEP_HIST=250
PLUGINS_KEEP_HIST__metadata="{}"
REPORT_DASHBOARD_URL='http://netalertx'
REPORT_DASHBOARD_URL__metadata="{}"
DAYS_TO_KEEP_EVENTS=30
DAYS_TO_KEEP_EVENTS__metadata="{}"
HRS_TO_KEEP_NEWDEV=0
HRS_TO_KEEP_NEWDEV__metadata="{}"
HRS_TO_KEEP_OFFDEV=0
HRS_TO_KEEP_OFFDEV__metadata="{}"
CLEAR_NEW_FLAG=0
CLEAR_NEW_FLAG__metadata="{}"
API_CUSTOM_SQL='SELECT * FROM Devices WHERE devPresentLastScan = 0'
API_CUSTOM_SQL__metadata="{}"
VERSION='1736591408'
VERSION__metadata="{}"
NETWORK_DEVICE_TYPES=['AP','Gateway','Firewall','Hypervisor','Powerline','Switch','WLAN','PLC','Router','USB LAN Adapter','USB WIFI Adapter','Internet','Smart Bulb','Smart Plug']
NETWORK_DEVICE_TYPES__metadata="{}"
GRAPHQL_PORT=20212
GRAPHQL_PORT__metadata="{}"
API_TOKEN='redacted'
API_TOKEN__metadata="{}"

#remaining log settings truncated

docker-compose.yml

services:
  netalertx:
    container_name: netalertx
    image: "jokobsk/netalertx:latest"
    network_mode: "host"
    restart: unless-stopped
    volumes:
      - ./data/config:/app/config
      - ./data/db:/app/db
      - ./data/logs:/app/front/log
    environment:
      - TZ=America/New_York
      - PORT=8888

What installation are you running?

Production (netalertx)

app.log

Not really applicable for this issue (date and time are correct - just not formatted based on the timezone). It's not an error, so logs probably wouldn't show anything useful. If absolutely needed, I can try to generate something.

Debug enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.
@eagle79 eagle79 added the bug 🐛 Something isn't working label Jan 13, 2025
jokob-sk pushed a commit that referenced this issue Jan 14, 2025
@jokob-sk
Copy link
Owner

This should be available in the next release.

Synology-NAS
(14-Jan-2025 13:30:08)

It would be great if you could test this. Can you please switch to the netalertx-dev docker image (backup everything at first or, ideally spin up a separate container with a separate db and config), in about 15 minutes (or after the last action finishes) from now?

Make sure you refresh your browser cache - and click the 🔄 refresh button in the top right corner.

Thanks in advance,
j

@jokob-sk jokob-sk added next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. Feature request➕ New feature or request and removed bug 🐛 Something isn't working labels Jan 14, 2025
@eagle79
Copy link
Author

eagle79 commented Jan 14, 2025

I see my current date now as 13-Jan-2025. That works just fine for me! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request➕ New feature or request next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed.
Projects
None yet
Development

No branches or pull requests

2 participants