diff --git a/components.d.ts b/components.d.ts
index 3e65c3cc5..5aa9638f8 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -130,19 +130,23 @@ declare module '@vue/runtime-core' {
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
- NCheckbox: typeof import('naive-ui')['NCheckbox']
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
+ NDatePicker: typeof import('naive-ui')['NDatePicker']
NDivider: typeof import('naive-ui')['NDivider']
+ NDynamicInput: typeof import('naive-ui')['NDynamicInput']
NEllipsis: typeof import('naive-ui')['NEllipsis']
+ NFormItem: typeof import('naive-ui')['NFormItem']
NH1: typeof import('naive-ui')['NH1']
NH3: typeof import('naive-ui')['NH3']
NIcon: typeof import('naive-ui')['NIcon']
+ NInput: typeof import('naive-ui')['NInput']
NLayout: typeof import('naive-ui')['NLayout']
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
NMenu: typeof import('naive-ui')['NMenu']
+ NSelect: typeof import('naive-ui')['NSelect']
NSpace: typeof import('naive-ui')['NSpace']
- NTable: typeof import('naive-ui')['NTable']
+ NSwitch: typeof import('naive-ui')['NSwitch']
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
@@ -173,6 +177,7 @@ declare module '@vue/runtime-core' {
TextToBinary: typeof import('./src/tools/text-to-binary/text-to-binary.vue')['default']
TextToNatoAlphabet: typeof import('./src/tools/text-to-nato-alphabet/text-to-nato-alphabet.vue')['default']
TextToUnicode: typeof import('./src/tools/text-to-unicode/text-to-unicode.vue')['default']
+ TimezoneConverter: typeof import('./src/tools/timezone-converter/timezone-converter.vue')['default']
TokenDisplay: typeof import('./src/tools/otp-code-generator-and-validator/token-display.vue')['default']
'TokenGenerator.tool': typeof import('./src/tools/token-generator/token-generator.tool.vue')['default']
TomlToJson: typeof import('./src/tools/toml-to-json/toml-to-json.vue')['default']
diff --git a/package.json b/package.json
index f5dedc0c6..37f1b98d8 100644
--- a/package.json
+++ b/package.json
@@ -53,6 +53,7 @@
"change-case": "^4.1.2",
"colord": "^2.9.3",
"composerize-ts": "^0.6.2",
+ "countries-and-timezones": "^3.6.0",
"country-code-lookup": "^0.1.0",
"cron-validator": "^1.3.1",
"cronstrue": "^2.26.0",
@@ -64,6 +65,7 @@
"figlet": "^1.7.0",
"figue": "^1.2.0",
"fuse.js": "^6.6.2",
+ "get-timezone-offset": "^1.0.5",
"highlight.js": "^11.7.0",
"iarna-toml-esm": "^3.0.5",
"ibantools": "^4.3.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e43a3217e..1a285c3d3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -59,6 +59,9 @@ dependencies:
composerize-ts:
specifier: ^0.6.2
version: 0.6.2
+ countries-and-timezones:
+ specifier: ^3.6.0
+ version: 3.6.0
country-code-lookup:
specifier: ^0.1.0
version: 0.1.0
@@ -92,6 +95,9 @@ dependencies:
fuse.js:
specifier: ^6.6.2
version: 6.6.2
+ get-timezone-offset:
+ specifier: ^1.0.5
+ version: 1.0.5
highlight.js:
specifier: ^11.7.0
version: 11.7.0
@@ -4657,6 +4663,11 @@ packages:
browserslist: 4.22.1
dev: true
+ /countries-and-timezones@3.6.0:
+ resolution: {integrity: sha512-8/nHBCs1eKeQ1jnsZVGdqrLYxS8nPcfJn8PnmxdJXWRLZdXsGFR8gnVhRjatGDBjqmPm7H+FtYpBYTPWd0Eiqg==}
+ engines: {node: '>=8.x', npm: '>=5.x'}
+ dev: false
+
/country-code-lookup@0.1.0:
resolution: {integrity: sha512-IOI66HEG+8bXfWPy+sTzuN7161vmDZOHg1wgIPFf3WfD73FeLajnn6C+fnxOIa9RL1WRBDMXQQWW/FOaOYaQ3w==}
dev: false
@@ -5860,6 +5871,11 @@ packages:
get-intrinsic: 1.2.2
dev: true
+ /get-timezone-offset@1.0.5:
+ resolution: {integrity: sha512-+B+/vEJ9qJgZheDVNmuY+4il8sJhTFXRvSiiqyRfwiCEhTaZqn/yCoNToDzQL+Mv9DLKlyO1bSIP5nUCJQN9Aw==}
+ engines: {node: '>=4.0.0'}
+ dev: false
+
/get-tsconfig@4.7.2:
resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==}
dependencies:
diff --git a/src/tools/index.ts b/src/tools/index.ts
index 388cfaf49..b15b649b9 100644
--- a/src/tools/index.ts
+++ b/src/tools/index.ts
@@ -9,6 +9,7 @@ import { tool as textToUnicode } from './text-to-unicode';
import { tool as safelinkDecoder } from './safelink-decoder';
import { tool as xmlToJson } from './xml-to-json';
import { tool as jsonToXml } from './json-to-xml';
+import { tool as timezoneConverter } from './timezone-converter';
import { tool as regexTester } from './regex-tester';
import { tool as regexMemo } from './regex-memo';
import { tool as markdownToHtml } from './markdown-to-html';
@@ -97,6 +98,7 @@ export const toolsByCategory: ToolCategory[] = [
name: 'Converter',
components: [
dateTimeConverter,
+ timezoneConverter,
baseConverter,
romanNumeralConverter,
base64StringConverter,
diff --git a/src/tools/timezone-converter/get-timezone-offset.d.ts b/src/tools/timezone-converter/get-timezone-offset.d.ts
new file mode 100644
index 000000000..e7f4320fd
--- /dev/null
+++ b/src/tools/timezone-converter/get-timezone-offset.d.ts
@@ -0,0 +1,3 @@
+declare module "get-timezone-offset" {
+ export default function(timeZoneName: string, date: Date);
+}
\ No newline at end of file
diff --git a/src/tools/timezone-converter/index.ts b/src/tools/timezone-converter/index.ts
new file mode 100644
index 000000000..318fcf941
--- /dev/null
+++ b/src/tools/timezone-converter/index.ts
@@ -0,0 +1,12 @@
+import { CalendarTime } from '@vicons/tabler';
+import { defineTool } from '../tool';
+
+export const tool = defineTool({
+ name: 'Timezone Converter',
+ path: '/timezone-converter',
+ description: 'Convert Date-Time from a timezone to others and get timezone vs countries infos',
+ keywords: ['timezone', 'tz', 'date', 'time', 'country', 'converter'],
+ component: () => import('./timezone-converter.vue'),
+ icon: CalendarTime,
+ createdAt: new Date('2024-08-15'),
+});
diff --git a/src/tools/timezone-converter/timezone-converter.vue b/src/tools/timezone-converter/timezone-converter.vue
new file mode 100644
index 000000000..ba11a7f93
--- /dev/null
+++ b/src/tools/timezone-converter/timezone-converter.vue
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ {{ tz.name }} ({{ tz.countries.join(', ') }}): UTC= {{ tz.utcOffsetStr }}, DST= {{ tz.dstOffsetStr }}
+
+
+
+
+
+
+
+
+
+
+ -
+ {{ country.name }} ({{ country.id }}): {{ country.timezones.join(', ') }}
+
+
+
+
+