Akkadius / glass-isc-dhcp

Glass - ISC DHCP Server Interface
MIT License
684 stars 142 forks source link

Adding ability to specify a date and time format #75

Open atownsend247 opened 3 years ago

atownsend247 commented 3 years ago

This gives the user an option to override the default date format using the global glass_config.js file. This was requested in the Issue https://github.com/Akkadius/glass-isc-dhcp/issues/67 . I have added the moment library as this aids in parsing and formatting dates with ease. I have replaced all instances of the human_time function with that using moment instead. The available options for the date/time can be derived from the following options found on the moment documentation: https://momentjs.com/docs/#/displaying/format/

Happy to further discuss changes/amendments if required. I created this as I wanted to tweak the date/time formats myself as requested in Issue https://github.com/Akkadius/glass-isc-dhcp/issues/67, so thought I'd go ahead and fix it now I've had some free time.