ibapi 0.2.3

A synchronous implementation of the Interactive Brokers TWS API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use time::macros::datetime;
use time_tz::{timezones, OffsetResult, PrimitiveDateTimeExt};

use super::*;

#[test]
fn test_parse_connection_time() {
    let example = "20230405 22:20:39 PST";
    let (connection_time, _) = parse_connection_time(example);

    let la = timezones::db::america::LOS_ANGELES;
    if let OffsetResult::Some(other) = datetime!(2023-04-05 22:20:39).assume_timezone(la) {
        assert_eq!(connection_time, other);
    }
}