Skip to content

Commit b2ab8f5

Browse files
authored
use static timestamp example (#1660)
1 parent 98a02e3 commit b2ab8f5

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

apps/hermes/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/hermes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hermes"
3-
version = "0.5.10"
3+
version = "0.5.11"
44
description = "Hermes is an agent that provides Verified Prices from the Pythnet Pyth Oracle."
55
edition = "2021"
66

apps/hermes/src/api/doc_examples.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,8 @@ pub fn price_feed_id_example() -> &'static str {
1313

1414
/// Example value for a unix timestamp
1515
pub fn timestamp_example() -> UnixTimestamp {
16-
use std::time::{
17-
SystemTime,
18-
UNIX_EPOCH,
19-
};
20-
21-
let start = SystemTime::now();
22-
let since_the_epoch = start
23-
.duration_since(UNIX_EPOCH)
24-
.expect("Time went backwards");
25-
26-
since_the_epoch.as_secs() as UnixTimestamp
16+
const STATIC_UNIX_TIMESTAMP: UnixTimestamp = 1717632000; // Thursday, 6 June 2024 00:00:00 GMT
17+
STATIC_UNIX_TIMESTAMP
2718
}
2819

2920
/// Example value for a VAA

0 commit comments

Comments
 (0)