coderuday21 commited on
Commit
b084ff6
·
1 Parent(s): b04dab8

Force history timestamps to IST (GMT+5:30 Asia/Kolkata)

Browse files
Files changed (2) hide show
  1. static/js/app.js +3 -2
  2. templates/index.html +1 -1
static/js/app.js CHANGED
@@ -659,8 +659,9 @@ async function openRunFromHistory(runId) {
659
 
660
  function formatDate(iso) {
661
  const d = new Date(iso);
662
- return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' })
663
- + ' ' + d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' });
 
664
  }
665
 
666
  // ---- Delete modal ----
 
659
 
660
  function formatDate(iso) {
661
  const d = new Date(iso);
662
+ const tz = 'Asia/Kolkata';
663
+ return d.toLocaleDateString('en-IN', { timeZone: tz, month: 'short', day: 'numeric', year: 'numeric' })
664
+ + ' ' + d.toLocaleTimeString('en-IN', { timeZone: tz, hour: '2-digit', minute: '2-digit', hour12: true });
665
  }
666
 
667
  // ---- Delete modal ----
templates/index.html CHANGED
@@ -345,6 +345,6 @@
345
  </div>
346
  </div>
347
 
348
- <script src="/static/js/app.js?v=20"></script>
349
  </body>
350
  </html>
 
345
  </div>
346
  </div>
347
 
348
+ <script src="/static/js/app.js?v=21"></script>
349
  </body>
350
  </html>