From 70f2e59f68a35b82e2e2f4806d45200e3eac9136 Mon Sep 17 00:00:00 2001 From: labmecanicatec <58854556+labmecanicatec@users.noreply.github.com> Date: Wed, 30 Jul 2025 09:53:55 -0500 Subject: [PATCH] refactor: timezone handling and remove jstz library Replaced the manual timezone list in config/timezones.php with dynamic generation using DateTimeZone::listIdentifiers(). Removed the jstz.min.js library and updated register.tpl to use the native Intl.DateTimeFormat API for timezone detection, simplifying the code and reducing dependencies. --- Web/scripts/js/jstz.min.js | 13 -- config/timezones.php | 409 +------------------------------------ tpl/register.tpl | 9 +- 3 files changed, 5 insertions(+), 426 deletions(-) delete mode 100644 Web/scripts/js/jstz.min.js diff --git a/Web/scripts/js/jstz.min.js b/Web/scripts/js/jstz.min.js deleted file mode 100644 index 0c12c4e9d..000000000 --- a/Web/scripts/js/jstz.min.js +++ /dev/null @@ -1,13 +0,0 @@ -var jstz=function(){var b=function(a){a=-a.getTimezoneOffset();return a!==null?a:0},d=function(){return b(new Date(2010,0,1,0,0,0,0))},e=function(){return b(new Date(2010,5,1,0,0,0,0))},c=function(){var a=d(),b=e(),f=d()-e();if(f<0)return a+",1";else if(f>0)return b+",1,s";return a+",0"};return{determine_timezone:function(){var a=c();return new jstz.TimeZone(jstz.olson.timezones[a])},date_is_dst:function(a){var c=a.getMonth()>5?e():d(),a=b(a);return c-a!==0}}}(); -jstz.TimeZone=function(){var b=null,d=null,e=null,c=function(a){e=a[0];b=a[1];d=a[2];if(typeof jstz.olson.ambiguity_list[b]!=="undefined")for(var a=jstz.olson.ambiguity_list[b],c=a.length,f=0,g=a[0];f