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

Date/Time display locale format selector #7343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NOYB
Copy link
Contributor

@NOYB NOYB commented Mar 25, 2024

Date/Time display locale format selector

Remains unchanged as log raw (ISO 8601: YYYY-MM-DDThh:mm:ss+/-hh:mm) unless a different display format is selected.

A major purpose of a GUI is human ease of use. Date/Time strings in ISO 8601 format are great for data transfer between systems. Though not humanly convenient.
This patch makes possible to optionally select a humanly convenient date/time log display format based on the client locale or the OPNsense web GUI language. ex: Mar 25 13:15:45

The logged ISO 8601 date/time string is not altered by this patch.

Display Formats:

SYSTEM: SETTINGS: LOGGING

  • Web GUI Language (MMM DD hh:mm:ss)
  • Client Locale (MMM DD hh:mm:ss)
  • Log Raw (YYYY-MM-DDThh:mm:ss+/-hh:mm)
  • Log Long (YYYY-MM-DD hh:mm:ss+/-hh)
  • Log Long w/o TZ (YYYY-MM-DD hh:mm:ss)
  • Log Short (MM-DD hh:mm:ss)

SYSTEM: LOG FILES: BOOT (does not include TZ)

  • Log Raw (YYYY-MM-DDThh:mm:ss)
  • Log Long (YYYY-MM-DD hh:mm:ss)

FIREWALL: SETTINGS: ADVANCED -> Logging

  • Web GUI Language (MMM DD hh:mm:ss)
  • Client Locale (MMM DD hh:mm:ss)
  • Log Raw (YYYY-MM-DDThh:mm:ss+/-hh:mm)
  • Log Long (YYYY-MM-DD hh:mm:ss+/-hh)
  • Log Long w/o TZ (YYYY-MM-DD hh:mm:ss)
  • Log Short (MM-DD hh:mm:ss)

FIREWALL: ALIASES -> Last Updated (does not include TZ)

  • Log Raw (YYYY-MM-DDThh:mm:ss.nnnnnn)
  • Log Long (YYYY-MM-DD hh:mm:ss)

Firewall Log Widget
System Log Widget

  • Web GUI Language (MMM DD hh:mm)
  • Client Locale (MMM DD hh:mm)
  • Log Raw (YYYY-MM-DDThh:mm:ss+/-hh:mm)
  • Log Long (YYYY-MM-DD hh:mm:ss+/-hh)
  • Log Long w/o TZ (YYYY-MM-DD hh:mm:ss)
  • Log Short (MM-DD hh:mm)

@AdSchellevis AdSchellevis self-assigned this Mar 25, 2024
@NOYB NOYB force-pushed the Date/Time_display_locale_format_selector branch 2 times, most recently from 028e9d7 to 5baae58 Compare April 7, 2024 05:58
Remains unchanged as log raw (ISO 8601: YYYY-MM-DDThh:mm:ss+/-hh:mm) unless a different display format is selected.

A major purpose of a GUI is human ease of use.  Date/Time strings in ISO 8601 format are great for data transfer between systems.  Though not humanly convenient.
This patch makes possible to optionally select a humanly convenient date/time log display format based on the client locale or the OPNsense web GUI language.  ex: Mar 25 13:15:45

The logged ISO 8601 date/time string is not altered by this patch.

Display Formats:

SYSTEM: SETTINGS: LOGGING
 + Web GUI Language (MMM DD hh:mm:ss)
 + Client Locale (MMM DD hh:mm:ss)
 + Log Raw (YYYY-MM-DDThh:mm:ss+/-hh:mm)
 + Log Long (YYYY-MM-DD hh:mm:ss+/-hh)
 + Log Long w/o TZ (YYYY-MM-DD hh:mm:ss)
 + Log Short (MM-DD hh:mm:ss)

SYSTEM: LOG FILES: BOOT (does not include TZ)
 + Log Raw (YYYY-MM-DDThh:mm:ss)
 + Log Long (YYYY-MM-DD hh:mm:ss)

FIREWALL: SETTINGS: ADVANCED -> Logging
 + Web GUI Language (MMM DD hh:mm:ss)
 + Client Locale (MMM DD hh:mm:ss)
 + Log Raw (YYYY-MM-DDThh:mm:ss+/-hh:mm)
 + Log Long (YYYY-MM-DD hh:mm:ss+/-hh)
 + Log Long w/o TZ (YYYY-MM-DD hh:mm:ss)
 + Log Short (MM-DD hh:mm:ss)

FIREWALL: ALIASES -> Last Updated (does not include TZ)
 + Log Raw (YYYY-MM-DDThh:mm:ss.nnnnnn)
 + Log Long (YYYY-MM-DD hh:mm:ss)

Firewall Log Widget
System Log Widget
 + Web GUI Language (MMM DD hh:mm)
 + Client Locale (MMM DD hh:mm)
 + Log Raw (YYYY-MM-DDThh:mm:ss+/-hh:mm)
 + Log Long (YYYY-MM-DD hh:mm:ss+/-hh)
 + Log Long w/o TZ (YYYY-MM-DD hh:mm:ss)
 + Log Short (MM-DD hh:mm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants