-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
488 lines (450 loc) · 34.4 KB
/
Copy pathindex.html
File metadata and controls
488 lines (450 loc) · 34.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<!-- Security: strict CSP delivered via <meta> (host-independent — works on
GitHub Pages, which cannot send custom headers). The app has zero inline
JS and one same-origin module script, so script-src 'self' is safe.
Inline style attributes require style-src 'unsafe-inline' (CSS-only
injection is low risk once script is locked down).
NOTE: frame-ancestors / X-Frame-Options / nosniff / HSTS / Permissions-
Policy are header-only and cannot be delivered in the current topology
(GitHub Pages origin + Cloudflare DNS-only). Clickjacking is mitigated
by the frame-buster in js/app.js. See SECURITY.md for the proper fix
(Cloudflare proxy + Transform Rules). frame-ancestors is kept here so it
takes effect automatically if the site is ever served with real headers. -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'; connect-src 'self'; manifest-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'; upgrade-insecure-requests">
<meta name="referrer" content="strict-origin-when-cross-origin">
<meta name="description" content="Meeting time finder, timezone comparison & MCE date conversion tool.">
<meta name="theme-color" content="#1D73C9">
<!-- Open Graph -->
<meta property="og:title" content="Clockforce">
<meta property="og:description" content="Meeting time finder, timezone comparison & MCE date conversion tool.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://clockforce.mateuszdabrowski.pl">
<meta property="og:image" content="https://clockforce.mateuszdabrowski.pl/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Clockforce">
<meta name="twitter:description" content="Meeting time finder, timezone comparison & MCE date conversion tool.">
<meta name="twitter:image" content="https://clockforce.mateuszdabrowski.pl/og-image.png">
<title>Clockforce</title>
<link rel="icon" type="image/png" href="favicon.png?v=2.4.1">
<!-- App CSS (order matters) -->
<link rel="stylesheet" href="css/variables.css?v=2.4.1">
<link rel="stylesheet" href="css/theme.css?v=2.4.1">
<link rel="stylesheet" href="css/layout.css?v=2.4.1">
<link rel="stylesheet" href="css/toolbar.css?v=2.4.1">
<link rel="stylesheet" href="css/sidebar.css?v=2.4.1">
<link rel="stylesheet" href="css/clock.css?v=2.4.1">
<link rel="stylesheet" href="css/timeline.css?v=2.4.1">
<link rel="stylesheet" href="css/modals.css?v=2.4.1">
</head>
<body>
<!-- Skip navigation for keyboard/screen reader users -->
<a href="#clock-content" class="md-skip-link">Skip to main content</a>
<!-- Toast notification -->
<div id="notification-toast" class="md-toast hidden" role="status" aria-live="polite"></div>
<!-- App Layout -->
<div id="app" class="md-app">
<!-- Toolbar -->
<header id="toolbar" class="md-toolbar" role="banner">
<!-- Left: Logo + MCE dropdown + Display dropdown -->
<div class="md-toolbar__left">
<a href="https://mateuszdabrowski.pl" target="_blank" rel="noopener noreferrer" class="md-toolbar__brand">
<img src="logo.png" class="md-toolbar__brand-logo" alt="Clockforce logo" width="32" height="32">
<span class="md-toolbar__brand-text">Clockforce</span>
</a>
<!-- View mode segmented control (visible on all screen sizes) -->
<div class="md-toolbar__view-toggle" role="radiogroup" aria-label="View mode">
<button id="btn-view-timeline" class="md-toolbar__view-btn" role="radio" aria-checked="false" title="Timeline view">
<svg class="md-toolbar__view-icon" viewBox="0 0 520 520" fill="currentColor" width="16" height="16" aria-hidden="true"><path d="M465 20H55c-8 0-15 7-15 15v50c0 8 7 15 15 15h410c8 0 15-7 15-15V35c0-8-7-15-15-15M145 140H55c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15M145 240H55c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15M145 340H55c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15M145 440H55c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15m160 0h-90c-8 0-15 7-15 15v30c0 8 7 15 15 15h90c8 0 15-7 15-15v-30c0-8-7-15-15-15"/></svg>
<span class="md-toolbar__view-text">Timeline</span>
</button>
<button id="btn-view-clocks" class="md-toolbar__view-btn" role="radio" aria-checked="false" title="Clock faces">
<svg class="md-toolbar__view-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" width="16" height="16" aria-hidden="true"><circle cx="8" cy="8" r="6"/><polyline points="8,5 8,8 10.5,9.5" stroke-linecap="round"/></svg>
<span class="md-toolbar__view-text">Clocks</span>
</button>
</div>
<div class="md-toolbar__group">
<!-- Save/Load dropdown -->
<div class="md-toolbar__dropdown">
<button id="btn-saveload" class="md-toolbar__button" title="Save / Load" aria-haspopup="menu" aria-expanded="false">
<svg class="md-toolbar__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/>
<polyline points="17 21 17 13 7 13 7 21"/>
<polyline points="7 3 7 8 15 8"/>
</svg>
<span>Save / Load</span>
<svg class="md-toolbar__chevron" aria-hidden="true" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
</button>
<div class="md-toolbar__menu" role="menu">
<button id="btn-save-browser" class="md-toolbar__menu-item" role="menuitem">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="16" height="16" aria-hidden="true"><path d="M371 40v136c0 10-8 19-19 19H139c-10 0-19-8-19-19V40H80a40 40 0 00-40 40v360a40 40 0 0040 40h360a40 40 0 0040-40V112l-72-72zm70 381c0 10-8 19-19 19H99c-10 0-19-8-19-19V254c0-10 8-19 19-19h323c10 0 19 8 19 19zM248 136c0 10 8 19 19 19h46c10 0 19-8 19-19V40h-83z"/></svg>
Save to Browser
</button>
<button id="btn-load-browser" class="md-toolbar__menu-item" role="menuitem">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="16" height="16" aria-hidden="true"><path d="M485 310h-30c-8 0-15 8-15 15v100c0 8-7 15-15 15H95c-8 0-15-7-15-15V325c0-7-7-15-15-15H35c-8 0-15 8-15 15v135a40 40 0 0040 40h400a40 40 0 0040-40V325c0-7-7-15-15-15M270 24c-6-6-15-6-21 0L114 159c-6 6-6 15 0 21l21 21c6 6 15 6 21 0l56-56c6-6 18-2 18 7v212c0 8 6 15 14 15h30c8 0 16-8 16-15V153c0-9 10-13 17-7l56 56c6 6 15 6 21 0l21-21c6-6 6-15 0-21z"/></svg>
Load from Browser
</button>
<div class="md-toolbar__menu-separator" role="separator"></div>
<button id="btn-export-json" class="md-toolbar__menu-item" role="menuitem">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="16" height="16" aria-hidden="true"><path d="M485 310h-30c-8 0-15 7-15 15v100c0 8-7 15-15 15H95c-8 0-15-7-15-15V325c0-8-7-15-15-15H35c-8 0-15 7-15 15v135a40 40 0 0040 40h400a40 40 0 0040-40V325c0-8-7-15-15-15m-235 66c6 6 15 6 21 0l135-135c6-6 6-15 0-21l-21-21c-6-6-15-6-21 0l-56 56c-6 6-17 2-17-7V35c-1-8-9-15-16-15h-30c-8 0-15 7-15 15v212c0 9-11 13-17 7l-56-56c-6-6-15-6-21 0l-21 22c-6 6-6 15 0 21z"/></svg>
Export as JSON
</button>
<button id="btn-import-json" class="md-toolbar__menu-item" role="menuitem">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="16" height="16" aria-hidden="true"><path d="M485 310h-30c-8 0-15 8-15 15v100c0 8-7 15-15 15H95c-8 0-15-7-15-15V325c0-7-7-15-15-15H35c-8 0-15 8-15 15v135a40 40 0 0040 40h400a40 40 0 0040-40V325c0-7-7-15-15-15M270 24c-6-6-15-6-21 0L114 159c-6 6-6 15 0 21l21 21c6 6 15 6 21 0l56-56c6-6 18-2 18 7v212c0 8 6 15 14 15h30c8 0 16-8 16-15V153c0-9 10-13 17-7l56 56c6 6 15 6 21 0l21-21c6-6 6-15 0-21z"/></svg>
Import from JSON
</button>
<div class="md-toolbar__menu-separator" role="separator"></div>
<button id="btn-share-url" class="md-toolbar__menu-item" role="menuitem">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="16" height="16" aria-hidden="true"><path d="M272 417l-21-3-21-6c-4-1-9 0-12 3l-5 5a79 79 0 01-106 6 77 77 0 01-4-112l76-76c10-10 22-16 34-20a79 79 0 0174 20l10 13c4 7 13 8 18 2l28-28c4-4 4-10 1-15l-14-16a128 128 0 00-71-37 143 143 0 00-124 37l-73 73C9 316 5 402 56 456c53 58 143 59 198 4l25-25c7-5 2-17-7-18M456 58c-55-51-141-47-193 6l-23 22c-7 7-2 19 7 20 14 1 28 4 42 8 4 1 9 0 12-3l5-5c29-29 76-32 106-6 34 29 35 81 4 112l-76 76a85 85 0 01-34 20 79 79 0 01-74-20l-10-13c-4-7-13-8-18-2l-28 28c-4 4-4 10-1 15l14 16a130 130 0 0070 37 143 143 0 00124-37l76-76c56-55 54-145-3-198"/></svg>
Share as URL
</button>
</div>
</div>
<!-- MCE Functions dropdown -->
<div class="md-toolbar__dropdown">
<button id="btn-mce" class="md-toolbar__button" title="MCE Functions" aria-haspopup="menu" aria-expanded="false">
<svg class="md-toolbar__icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/>
</svg>
<span>MCE Functions</span>
<svg class="md-toolbar__chevron" aria-hidden="true" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
</button>
<div class="md-toolbar__menu" role="menu">
<button id="btn-convert-date" class="md-toolbar__menu-item" role="menuitem">Convert MCE System Date</button>
<button id="btn-generate-scripts" class="md-toolbar__menu-item" role="menuitem">Generate Conversion Scripts</button>
</div>
</div>
</div>
</div>
<!-- Center: removed, datetime picker is now floating -->
<!-- Right: About + Display + Theme + Sidebar toggles -->
<div class="md-toolbar__right">
<!-- Time format toggle -->
<div class="md-toolbar__view-toggle" role="radiogroup" aria-label="Time format">
<button id="btn-fmt-12h" class="md-toolbar__view-btn" role="radio" aria-checked="false" title="12-hour format">12h</button>
<button id="btn-fmt-24h" class="md-toolbar__view-btn" role="radio" aria-checked="false" title="24-hour format">24h</button>
</div>
<button id="btn-share-icon" class="md-toolbar__button md-toolbar__button--icon-only" title="Share as URL" aria-label="Share as URL">
<svg class="md-toolbar__icon" viewBox="0 0 520 520" fill="currentColor" aria-hidden="true">
<path d="M272 417l-21-3-21-6c-4-1-9 0-12 3l-5 5a79 79 0 01-106 6 77 77 0 01-4-112l76-76c10-10 22-16 34-20a79 79 0 0174 20l10 13c4 7 13 8 18 2l28-28c4-4 4-10 1-15l-14-16a128 128 0 00-71-37 143 143 0 00-124 37l-73 73C9 316 5 402 56 456c53 58 143 59 198 4l25-25c7-5 2-17-7-18M456 58c-55-51-141-47-193 6l-23 22c-7 7-2 19 7 20 14 1 28 4 42 8 4 1 9 0 12-3l5-5c29-29 76-32 106-6 34 29 35 81 4 112l-76 76a85 85 0 01-34 20 79 79 0 01-74-20l-10-13c-4-7-13-8-18-2l-28 28c-4 4-4 10-1 15l14 16a130 130 0 0070 37 143 143 0 00124-37l76-76c56-55 54-145-3-198"/>
</svg>
</button>
<button id="btn-about" class="md-toolbar__button md-toolbar__button--icon-only" title="About Clockforce" aria-label="About">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm0 12.5a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11zM7.25 5a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0zM7.25 7h1.5v4.5h-1.5V7z"/>
</svg>
</button>
<button id="btn-theme" class="md-toolbar__button md-toolbar__button--icon-only" title="Toggle theme" aria-label="Toggle theme">
<svg class="md-toolbar__icon md-toolbar__icon--theme" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path class="md-icon-moon" d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
<g class="md-icon-sun"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></g>
</svg>
</button>
<div class="md-toolbar__separator"></div>
<div class="md-toolbar__tz-search-wrap">
<input type="search" id="tz-navbar-search" class="md-toolbar__tz-search-input" placeholder="Search Timezones" aria-label="Search timezones" autocomplete="off">
<svg class="md-toolbar__tz-search-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true">
<circle cx="7" cy="7" r="5"/>
<line x1="10.5" y1="10.5" x2="14" y2="14"/>
</svg>
</div>
</div>
<!-- Mobile hamburger -->
<div class="md-toolbar__hamburger-wrap">
<button id="btn-hamburger" class="md-toolbar__button md-toolbar__button--icon-only md-toolbar__hamburger-btn" title="Menu" aria-label="Menu" aria-expanded="false" aria-controls="hamburger-menu" aria-haspopup="menu">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<rect x="1" y="2.5" width="14" height="1.8" rx="0.9"/>
<rect x="1" y="7.1" width="14" height="1.8" rx="0.9"/>
<rect x="1" y="11.7" width="14" height="1.8" rx="0.9"/>
</svg>
</button>
<div id="hamburger-menu" class="md-toolbar__hamburger-menu" role="menu" aria-label="Application menu">
<button class="md-toolbar__menu-item" role="menuitem" data-action="convert-date">
<svg class="md-toolbar__menu-icon" viewBox="0 0 24 24" fill="currentColor" width="20" height="20" aria-hidden="true"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/></svg>
Convert MCE Date
</button>
<button class="md-toolbar__menu-item" role="menuitem" data-action="generate-scripts">
<svg class="md-toolbar__menu-icon" viewBox="0 0 16 16" fill="currentColor" width="20" height="20" aria-hidden="true"><path d="M5.854 4.854a.5.5 0 1 0-.708-.708l-3.5 3.5a.5.5 0 0 0 0 .708l3.5 3.5a.5.5 0 0 0 .708-.708L2.707 8l3.147-3.146zm4.292 0a.5.5 0 0 1 .708-.708l3.5 3.5a.5.5 0 0 1 0 .708l-3.5 3.5a.5.5 0 0 1-.708-.708L13.293 8l-3.147-3.146z"/></svg>
Generate Scripts
</button>
<div class="md-toolbar__menu-separator" role="separator"></div>
<button class="md-toolbar__menu-item" role="menuitem" data-action="save-browser">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="20" height="20" aria-hidden="true"><path d="M371 40v136c0 10-8 19-19 19H139c-10 0-19-8-19-19V40H80a40 40 0 00-40 40v360a40 40 0 0040 40h360a40 40 0 0040-40V112l-72-72zm70 381c0 10-8 19-19 19H99c-10 0-19-8-19-19V254c0-10 8-19 19-19h323c10 0 19 8 19 19zM248 136c0 10 8 19 19 19h46c10 0 19-8 19-19V40h-83z"/></svg>
Save to Browser
</button>
<button class="md-toolbar__menu-item" role="menuitem" data-action="load-browser">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="20" height="20" aria-hidden="true"><path d="M485 310h-30c-8 0-15 8-15 15v100c0 8-7 15-15 15H95c-8 0-15-7-15-15V325c0-7-7-15-15-15H35c-8 0-15 8-15 15v135a40 40 0 0040 40h400a40 40 0 0040-40V325c0-7-7-15-15-15M270 24c-6-6-15-6-21 0L114 159c-6 6-6 15 0 21l21 21c6 6 15 6 21 0l56-56c6-6 18-2 18 7v212c0 8 6 15 14 15h30c8 0 16-8 16-15V153c0-9 10-13 17-7l56 56c6 6 15 6 21 0l21-21c6-6 6-15 0-21z"/></svg>
Load from Browser
</button>
<button class="md-toolbar__menu-item" role="menuitem" data-action="share-url">
<svg class="md-toolbar__menu-icon" viewBox="0 0 520 520" fill="currentColor" width="20" height="20" aria-hidden="true"><path d="M272 417l-21-3-21-6c-4-1-9 0-12 3l-5 5a79 79 0 01-106 6 77 77 0 01-4-112l76-76c10-10 22-16 34-20a79 79 0 0174 20l10 13c4 7 13 8 18 2l28-28c4-4 4-10 1-15l-14-16a128 128 0 00-71-37 143 143 0 00-124 37l-73 73C9 316 5 402 56 456c53 58 143 59 198 4l25-25c7-5 2-17-7-18M456 58c-55-51-141-47-193 6l-23 22c-7 7-2 19 7 20 14 1 28 4 42 8 4 1 9 0 12-3l5-5c29-29 76-32 106-6 34 29 35 81 4 112l-76 76a85 85 0 01-34 20 79 79 0 01-74-20l-10-13c-4-7-13-8-18-2l-28 28c-4 4-4 10-1 15l14 16a130 130 0 0070 37 143 143 0 00124-37l76-76c56-55 54-145-3-198"/></svg>
Share as URL
</button>
<div class="md-toolbar__menu-separator" role="separator"></div>
<button class="md-toolbar__menu-item" role="menuitem" data-action="fmt-12h">12h Format</button>
<button class="md-toolbar__menu-item" role="menuitem" data-action="fmt-24h">24h Format</button>
<div class="md-toolbar__menu-separator" role="separator"></div>
<button class="md-toolbar__menu-item" role="menuitem" data-action="theme">
<svg class="md-toolbar__menu-icon md-toolbar__icon--theme" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="20" height="20">
<path class="md-icon-moon" d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
<g class="md-icon-sun"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></g>
</svg>
Toggle Theme
</button>
<button class="md-toolbar__menu-item" role="menuitem" data-action="about">
<svg class="md-toolbar__menu-icon" viewBox="0 0 16 16" fill="currentColor" width="20" height="20" aria-hidden="true"><path d="M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1zm0 12.5a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11zM7.25 5a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0zM7.25 7h1.5v4.5h-1.5V7z"/></svg>
About
</button>
<button class="md-toolbar__menu-item md-toolbar__menu-item--danger" role="menuitem" data-action="reset">
Reset to Now()
</button>
</div>
</div>
</header>
<!-- Main content area -->
<div class="md-main">
<!-- Left sidebar — Scripts panel -->
<aside id="scripts-panel" class="md-scripts" aria-label="Script snippets">
<div class="md-drag-handle" data-target="scripts-panel" role="separator" aria-label="Resize scripts panel"></div>
<div class="md-scripts__header">
<span class="md-scripts__title">MCE Conversion Snippets</span>
<button id="btn-close-scripts" class="md-toolbar__button md-toolbar__button--icon-only" title="Close scripts" aria-label="Close scripts">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" fill="none"/></svg>
</button>
</div>
<div class="md-scripts__body">
<!-- Stale IANA notice — runtime offsets disagree with baked-in snapshot -->
<div id="stale-iana-notice" class="md-scripts__notice md-scripts__notice--warning hidden">
<strong>Warning:</strong> Your browser's timezone definitions differ from the current IANA database for this region. The generated scripts below may use outdated offsets.
</div>
<!-- Local TZ notice -->
<div id="local-tz-notice" class="md-scripts__notice hidden">
<strong>SystemDateToLocalDate</strong> only works if this timezone is set as the local time for the current MCE user.
<button id="generate-dynamic-script" class="md-scripts__notice-btn">Generate Dynamic Script Instead</button>
</div>
<!-- No DST notice -->
<div id="no-dst-notice" class="md-scripts__notice md-scripts__notice--info hidden">
This timezone does <strong>not observe DST</strong> — snippets use a fixed offset. If you need DST-aware conversion (e.g. for audiences in DST regions), you can add DST boundaries.
<button id="add-dst-to-scripts" class="md-scripts__notice-btn">Add DST Offset to Snippets</button>
</div>
<!-- SQL -->
<div class="md-script-section">
<div class="md-script-section__label">MCE SQL</div>
<div class="md-script-section__content">
<code id="sql-text" class="md-script-section__code"></code>
<button class="md-script-section__copy" data-target="sql-text" aria-label="Copy SQL snippet">COPY</button>
</div>
</div>
<!-- AMPScript -->
<div class="md-script-section md-script-section--ampscript">
<div class="md-script-section__label">AMPScript</div>
<div class="md-script-section__content">
<code id="ampscript-text" class="md-script-section__code"></code>
<button class="md-script-section__copy" data-target="ampscript-text" aria-label="Copy AMPScript snippet">COPY</button>
</div>
</div>
<!-- SSJS -->
<div class="md-script-section md-script-section--ssjs">
<div class="md-script-section__label">SSJS</div>
<div class="md-script-section__content">
<code id="ssjs-text" class="md-script-section__code"></code>
<button class="md-script-section__copy" data-target="ssjs-text" aria-label="Copy SSJS snippet">COPY</button>
</div>
</div>
</div>
</aside>
<!-- Clock grid (main content) -->
<main id="clock-content" class="md-content">
<!-- Floating datetime picker -->
<div id="datetime-picker" class="md-datetime-picker">
<div class="md-datetime-picker__tz-select">
<button id="datetime-tz-btn" class="md-datetime-picker__tz-btn" title="Change timezone for date/time">
<span id="datetime-tz-label">Local</span>
<svg width="8" height="6" viewBox="0 0 10 6" aria-hidden="true"><path d="M1 1l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
</button>
<div id="datetime-tz-menu" class="md-datetime-picker__tz-menu hidden">
<!-- Populated dynamically -->
</div>
</div>
<input type="date" id="toolbar-date-input" class="md-datetime-picker__date-input" title="Set date" aria-label="Set date">
<input type="time" id="toolbar-time-input" class="md-datetime-picker__time-input" title="Set time" aria-label="Set time" step="60">
<button id="btn-apply-datetime" class="md-datetime-picker__apply-btn hidden" title="Apply date/time changes">Apply</button>
<button id="btn-reset" class="md-datetime-picker__reset-btn hidden" title="Reset to live time">Back to Now()</button>
</div>
<div id="clock-grid">
<!-- Clocks injected here -->
</div>
<div id="timeline-container" class="md-timeline hidden">
<!-- Rendered by timeline.js -->
</div>
</main>
<!-- Right sidebar — Timezone picker -->
<aside id="tz-panel" class="md-timezones md-timezones--hidden" aria-label="Timezone picker">
<div class="md-drag-handle" data-target="tz-panel" role="separator" aria-label="Resize timezone panel"></div>
<div class="md-sidebar__header">
<span class="md-sidebar__header-title">Available Timezones</span>
<span id="tz-count" class="md-sidebar__category-count">0</span>
<button id="btn-close-tz" class="md-toolbar__button md-toolbar__button--icon-only md-sidebar__close-btn" title="Close timezone panel" aria-label="Close timezone panel">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" fill="none"/></svg>
</button>
</div>
<div class="md-sidebar__body">
<ul id="tz-list" class="md-sidebar__items" role="listbox" aria-label="Timezone list">
<!-- Rendered by sidebar-tz.js -->
</ul>
</div>
</aside>
</div>
</div>
<!-- Clock template -->
<template id="clock-template">
<div class="clock-card">
<div class="clock-controls">
<svg class="home-icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M12 3L2 12H5V20H19V12H22L12 3Z" fill="currentColor"/>
</svg>
<svg class="salesforce-icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/>
</svg>
<button class="remove-btn" title="Remove Clock" aria-label="Remove Clock">
<svg class="remove-icon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<line x1="18" y1="6" x2="6" y2="18" stroke="currentColor" stroke-width="2"/>
<line x1="6" y1="6" x2="18" y2="18" stroke="currentColor" stroke-width="2"/>
</svg>
</button>
</div>
<div class="clock-container">
<div class="clock-face">
<div class="analog-face">
<div class="marker hour-1"></div>
<div class="marker hour-2"></div>
<div class="marker hour-3"></div>
<div class="marker hour-4"></div>
<div class="marker hour-5"></div>
<div class="marker hour-6"></div>
<div class="marker hour-7"></div>
<div class="marker hour-8"></div>
<div class="marker hour-9"></div>
<div class="marker hour-10"></div>
<div class="marker hour-11"></div>
<div class="marker hour-12"></div>
<div class="date-display"></div>
<div class="hand hour-hand"></div>
<div class="hand minute-hand"></div>
<div class="hand second-hand"></div>
<div class="center-dot"></div>
</div>
</div>
</div>
<div class="digital-readout"></div>
<div class="timezone-display"></div>
<div class="delete-overlay hidden">
<div class="delete-content">
<div class="delete-question">Delete?</div>
<div class="delete-actions">
<button class="confirm-delete">YES</button>
<button class="cancel-delete">NO</button>
</div>
</div>
</div>
</div>
</template>
<!-- MCE Date Input Modal -->
<div id="mce-modal" class="md-modal md-modal--hidden" role="dialog" aria-modal="true" aria-labelledby="mce-modal-title">
<div id="mce-modal-overlay" class="md-modal__overlay"></div>
<div class="md-modal__dialog">
<div class="md-modal__header">
<h2 id="mce-modal-title" class="md-modal__title">Convert MCE System Date</h2>
<button id="btn-close-mce-modal" class="md-toolbar__button" aria-label="Close">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" fill="none"/></svg>
</button>
</div>
<div class="md-modal__body">
<p class="md-mce-instruction">Enter a Salesforce Marketing Cloud Engagement system date to lock all clocks to that point in time.</p>
<div class="md-mce-input-group">
<input type="text" id="mce-datetime-input" class="md-mce-input" placeholder="e.g. Dec 23 2020 2:31PM" aria-label="System Date Input">
<button id="mce-apply-btn" class="md-mce-apply-btn">APPLY</button>
</div>
<span id="mce-feedback" class="md-mce-feedback" aria-live="polite"></span>
</div>
</div>
</div>
<!-- Script Timezone Picker Modal -->
<div id="script-picker-modal" class="md-modal md-modal--hidden" role="dialog" aria-modal="true" aria-labelledby="script-picker-title">
<div id="script-picker-overlay" class="md-modal__overlay"></div>
<div class="md-modal__dialog">
<div class="md-modal__header">
<h2 id="script-picker-title" class="md-modal__title">Select Timezone for Scripts</h2>
<button id="btn-close-script-picker" class="md-toolbar__button" aria-label="Close">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" fill="none"/></svg>
</button>
</div>
<div class="md-modal__body">
<ul id="script-tz-list" class="md-script-tz-list" role="listbox">
<!-- Populated by toolbar.js -->
</ul>
</div>
</div>
</div>
<!-- About Modal -->
<div id="about-modal" class="md-modal md-modal--hidden" role="dialog" aria-modal="true" aria-labelledby="about-modal-title">
<div id="about-modal-overlay" class="md-modal__overlay"></div>
<div class="md-modal__dialog md-about">
<div class="md-modal__header">
<h2 id="about-modal-title" class="md-modal__title">About Clockforce</h2>
<button id="btn-close-about" class="md-toolbar__button" aria-label="Close">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" fill="none"/></svg>
</button>
</div>
<div class="md-modal__body md-about__body">
<div class="md-about__logo">
<img src="logo.png" alt="Clockforce" width="64" height="64">
</div>
<p class="md-about__tagline">Meeting time finder, timezone comparison & MCE date conversion tool</p>
<div class="md-about__info">
<p>Find the best meeting times across timezones with the interactive timeline view. Drag to select time ranges, save Time Blocks (one-off or recurring) and click them to preview across all timezones. Compare sunrise/sunset across locations. Switch between Timeline and Clocks views with strict 12h/24h time format support.</p>
<p>Use the floating datetime picker to lock all clocks to any point in time in any timezone. Generate production-ready date conversion scripts for <a href="https://www.salesforce.com/products/marketing-cloud/" target="_blank" rel="noopener">Salesforce Marketing Cloud Engagement</a> in SQL, AMPScript, and SSJS with DST-aware logic.</p>
<p>Save and load configurations, share via URL, and export/import as JSON. Built with vanilla JavaScript and the <a href="https://www.lightningdesignsystem.com/" target="_blank" rel="noopener">Salesforce Lightning Design System</a>.</p>
</div>
<div class="md-about__meta">
<span class="md-about__version">v2.4.1</span>
<span class="md-about__separator">·</span>
<a href="https://mateuszdabrowski.pl" target="_blank" rel="noopener" class="md-about__link">mateuszdabrowski.pl</a>
<span class="md-about__separator">·</span>
<a href="https://github.com/MateuszDabrowski/clockforce" target="_blank" rel="noopener" class="md-about__link">GitHub</a>
<span class="md-about__separator">·</span>
<a href="https://www.linkedin.com/in/mateusz-dabrowski-pl/" target="_blank" rel="noopener" class="md-about__link">Feedback</a>
</div>
<div class="md-about__meta md-about__meta--license">
<span class="md-about__license-text">Licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" rel="noopener" class="md-about__link">CC BY-NC-SA 4.0</a></span>
</div>
</div>
</div>
</div>
<!-- Load from Browser Modal -->
<div id="load-modal" class="md-modal md-modal--hidden" role="dialog" aria-modal="true" aria-labelledby="load-modal-title">
<div id="load-modal-overlay" class="md-modal__overlay"></div>
<div class="md-modal__dialog md-modal__dialog--wide">
<div class="md-modal__header">
<h2 id="load-modal-title" class="md-modal__title">Load Configuration</h2>
<button id="btn-close-load-modal" class="md-toolbar__button" aria-label="Close">
<svg class="md-toolbar__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" fill="none"/></svg>
</button>
</div>
<div id="load-modal-list" class="md-modal__body md-modal__row-list">
<!-- Populated by saveload.js -->
</div>
</div>
</div>
<!-- Hidden file input for JSON import -->
<input type="file" id="json-import-input" accept=".json" class="hidden" aria-hidden="true">
<!-- App script as ES module -->
<script type="module" src="js/app.js?v=2.4.1"></script>
</body>
</html>