mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2026-08-17 16:34:54 -05:00
fix: show time in local timezone in chart rendering
This commit is contained in:
Generated
+6
-6
@@ -1764,7 +1764,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact"
|
name = "lact"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"divan",
|
"divan",
|
||||||
@@ -1776,7 +1776,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-cli"
|
name = "lact-cli"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"lact-client",
|
"lact-client",
|
||||||
@@ -1786,7 +1786,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-client"
|
name = "lact-client"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amdgpu-sysfs",
|
"amdgpu-sysfs",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -1801,7 +1801,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-daemon"
|
name = "lact-daemon"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amdgpu-sysfs",
|
"amdgpu-sysfs",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -1841,7 +1841,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-gui"
|
name = "lact-gui"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amdgpu-sysfs",
|
"amdgpu-sysfs",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -1876,7 +1876,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lact-schema"
|
name = "lact-schema"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amdgpu-sysfs",
|
"amdgpu-sysfs",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-cli"
|
name = "lact-cli"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-client"
|
name = "lact-client"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-daemon"
|
name = "lact-daemon"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-gui"
|
name = "lact-gui"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
authors = ["Ilya Zlobintsev <ilya.zl@protonmail.com>"]
|
authors = ["Ilya Zlobintsev <ilya.zl@protonmail.com>"]
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|
||||||
|
|||||||
@@ -119,8 +119,14 @@ pub fn fmt_clockspeed(clock_mhz: Option<u64>, ratio: f64) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn fmt_timestamp_to_dt(timestamp_ms: &i64) -> String {
|
pub fn fmt_timestamp_to_dt(timestamp_ms: &i64) -> String {
|
||||||
|
fmt_timestamp_to_dt_with_tz(timestamp_ms, jiff::tz::TimeZone::system())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn fmt_timestamp_to_dt_with_tz(timestamp_ms: &i64, tz: jiff::tz::TimeZone) -> String {
|
||||||
let date_time = jiff::Timestamp::from_millisecond(*timestamp_ms).unwrap();
|
let date_time = jiff::Timestamp::from_millisecond(*timestamp_ms).unwrap();
|
||||||
date_time.strftime("%H:%M:%S").to_string()
|
jiff::Zoned::new(date_time, tz)
|
||||||
|
.strftime("%H:%M:%S")
|
||||||
|
.to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
@@ -308,7 +314,10 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn fmt_timestamp_to_dt_formats_time() {
|
fn fmt_timestamp_to_dt_formats_time() {
|
||||||
let timestamp_ms = 0;
|
let timestamp_ms = 0;
|
||||||
assert_eq!(fmt_timestamp_to_dt(×tamp_ms), "00:00:00");
|
assert_eq!(
|
||||||
|
fmt_timestamp_to_dt_with_tz(×tamp_ms, jiff::tz::TimeZone::UTC),
|
||||||
|
"00:00:00"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact-schema"
|
name = "lact-schema"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lact"
|
name = "lact"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ metadata:
|
|||||||
description: GPU control utility
|
description: GPU control utility
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
license: MIT
|
license: MIT
|
||||||
version: 0.10.0
|
version: 0.10.1
|
||||||
maintainer: ilya-zlobintsev
|
maintainer: ilya-zlobintsev
|
||||||
url: https://github.com/ilya-zlobintsev/lact
|
url: https://github.com/ilya-zlobintsev/lact
|
||||||
source:
|
source:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ metadata:
|
|||||||
description: GPU control utility
|
description: GPU control utility
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
license: MIT
|
license: MIT
|
||||||
version: 0.10.0
|
version: 0.10.1
|
||||||
maintainer: ilya-zlobintsev
|
maintainer: ilya-zlobintsev
|
||||||
url: https://github.com/ilya-zlobintsev/lact
|
url: https://github.com/ilya-zlobintsev/lact
|
||||||
source:
|
source:
|
||||||
|
|||||||
Reference in New Issue
Block a user