mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
Merge pull request #560 from Squidly271/patch-4
Diagnostics: Adjust for timezone from webGUI
This commit is contained in:
@@ -22,8 +22,9 @@ $zip = htmlspecialchars(str_replace(' ','_',strtolower($var['NAME'])));
|
||||
|
||||
<script>
|
||||
function zipfile(){
|
||||
var d = new Date();
|
||||
return '<?=$zip?>-diagnostics-'+d.toISOString().substr(0,16).replace(/[-:]/g,'').replace('T','-')+'.zip';
|
||||
var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
||||
var localISOTime = (new Date(Date.now() - tzoffset)).toISOString().slice(0, -1);
|
||||
return '<?=$zip?>-diagnostics-'+localISOTime.substr(0,16).replace(/[-:]/g,'').replace('T','-')+'.zip';
|
||||
}
|
||||
function cleanUp(file) {
|
||||
if (document.hasFocus()) {
|
||||
|
||||
Reference in New Issue
Block a user