Skip to content

Commit 9d06f00

Browse files
committed
fix: add timezone key to alert and derived stream
1 parent fdfefc0 commit 9d06f00

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/common/meta/alerts/alert.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ pub struct Alert {
5050
/// Timezone offset in minutes.
5151
/// The negative secs means the Western Hemisphere
5252
pub tz_offset: i32,
53+
#[serde(skip_serializing_if = "Option::is_none")]
54+
pub timezone: Option<String>,
5355
#[serde(default)]
5456
pub last_triggered_at: Option<i64>,
5557
#[serde(default)]
@@ -87,6 +89,7 @@ impl Default for Alert {
8789
description: "".to_string(),
8890
enabled: false,
8991
tz_offset: 0, // UTC
92+
timezone: None,
9093
last_triggered_at: None,
9194
owner: None,
9295
updated_at: None,

src/common/meta/alerts/derived_streams.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ pub struct DerivedStreamMeta {
4646
/// Timezone offset in minutes.
4747
/// The negative secs means the Western Hemisphere
4848
pub tz_offset: i32,
49+
#[serde(skip_serializing_if = "Option::is_none")]
50+
pub timezone: Option<String>,
4951
}
5052

5153
impl Default for DerivedStreamMeta {
@@ -61,6 +63,7 @@ impl Default for DerivedStreamMeta {
6163
description: "".to_string(),
6264
enabled: true,
6365
tz_offset: 0, // UTC
66+
timezone: None,
6467
}
6568
}
6669
}

0 commit comments

Comments
 (0)