mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix Graph date selector (#15956)
It did not handle strings like now and -2d
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
<script src="<?php echo asset('js/RrdGraphJS/moment-timezone-with-data.js'); ?>"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var ds_datefrom = new Date(<?php echo $graph_array['from']; ?>*1000);
|
||||
var ds_dateto = new Date(<?php echo $graph_array['to']; ?>*1000);
|
||||
var ds_datefrom = new Date(<?php echo \LibreNMS\Util\Time::parseAt($graph_array['from']); ?>*1000);
|
||||
var ds_dateto = new Date(<?php echo \LibreNMS\Util\Time::parseAt($graph_array['to']); ?>*1000);
|
||||
var ds_tz = '<?php echo session('preferences.timezone'); ?>';
|
||||
if (ds_tz) {
|
||||
ds_datefrom = moment.tz(ds_datefrom, ds_tz);
|
||||
|
Reference in New Issue
Block a user