Skip to content

Commit 4a29354

Browse files
[BUGFIX] Create silences with timezone-aware dates #715
2 parents c3d1c02 + de461d2 commit 4a29354

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

promgen/static/js/promgen.vue.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,12 @@ app.component('silence-create-modal', {
256256

257257
const body = JSON.stringify({
258258
matchers: matchers,
259-
startsAt: this.form.startsAt,
260-
endsAt: this.form.endsAt,
259+
startsAt: this.form.startsAt
260+
? new Date(this.form.startsAt).toISOString()
261+
: undefined,
262+
endsAt: this.form.endsAt
263+
? new Date(this.form.endsAt).toISOString()
264+
: undefined,
261265
duration: this.form.duration,
262266
createdBy: this.form.createdBy,
263267
comment: this.form.comment

promgen/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</script>
6767
<script src="{% static 'js/promgen.js' %}?v=5"></script>
6868
<script src="{% static 'js/mixins.vue.js' %}"></script>
69-
<script src="{% static 'js/promgen.vue.js' %}?v=5"></script>
69+
<script src="{% static 'js/promgen.vue.js' %}?v=6"></script>
7070
{% block javascript %}{% endblock %}
7171

7272
<datalist style="display:none" id="common.labels">

0 commit comments

Comments
 (0)