]> git.proxmox.com Git - proxmox.git/commitdiff
proxmox-time: add missing 1.1.3 change
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 2 Jun 2022 11:33:17 +0000 (13:33 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 2 Jun 2022 12:33:12 +0000 (14:33 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
proxmox-time/Cargo.toml
proxmox-time/debian/changelog
proxmox-time/src/wasm.rs

index 63c520861fa109825376419c711165e039be42cb..535f78cf1cb31d71ecf1c2f85d06cd38759a5698 100644 (file)
@@ -1,6 +1,6 @@
 [package]
 name = "proxmox-time"
-version = "1.1.2"
+version = "1.1.3"
 authors = ["Proxmox Support Team <support@proxmox.com>"]
 edition = "2018"
 license = "AGPL-3"
index e3bf5c4f579b6e8c77b966108cfe97676fd6cb52..5e892561798efa0797d232e79e2c40c077137c03 100644 (file)
@@ -1,3 +1,9 @@
+rust-proxmox-time (1.1.3-1) stable; urgency=medium
+
+  * Allow to compile on wasm32 target
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 03 Dec 2021 09:23:46 +0100
+
 rust-proxmox-time (1.1.2-1) stable; urgency=medium
 
   * calendar-events: parse 'UTC' timezone into calendareven
index 04cea7d9ed3ce757c84683e191e54e72f1b8a95b..836bce3422d790208134abf8eaeadce2a58fd8ae 100644 (file)
@@ -10,8 +10,8 @@ pub fn epoch_f64() -> f64 {
     js_sys::Date::now() / 1000.0
 }
 
-/// Convert Unix epoch into RFC3339 UTC string
-pub fn epoch_to_rfc3339_utc(epoch: i64) -> Result<String, Error> {
+/// Convert Unix epoch into RFC3339 local time with TZ
+pub fn epoch_to_rfc3339(epoch: i64) -> Result<String, Error> {
     let js_date = js_sys::Date::new_0();
     js_date.set_time((epoch as f64) * 1000.0);
     js_date
@@ -20,13 +20,6 @@ pub fn epoch_to_rfc3339_utc(epoch: i64) -> Result<String, Error> {
         .ok_or_else(|| format_err!("to_iso_string did not return a string"))
 }
 
-/// Convert Unix epoch into RFC3339 local time with TZ
-pub fn epoch_to_rfc3339(epoch: i64) -> Result<String, Error> {
-    // Note: JS does not provide this, so we need to implement this ourselves.
-    // for now, we simply return UTC instead
-    epoch_to_rfc3339_utc(epoch)
-}
-
 /// Parse RFC3339 into Unix epoch
 pub fn parse_rfc3339(input_str: &str) -> Result<i64, Error> {
     // TOTO: This should parse olny RFC3339, but currently also parse