Mercurial > lbo > hg > geohub
changeset 6:6b97ebb6ee9c
Remove printlns and add more columns
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Tue, 01 Dec 2020 20:20:59 +0100 |
parents | b879b0124a07 |
children | ebcf9edce874 |
files | TODO pgsql_schema.sql src/main.rs |
diffstat | 3 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/TODO Tue Dec 01 20:05:32 2020 +0100 +++ b/TODO Tue Dec 01 20:20:59 2020 +0100 @@ -1,5 +1,4 @@ * notify via dynamic channels? static channels? polling? -* deploy first version FEATURES
--- a/pgsql_schema.sql Tue Dec 01 20:05:32 2020 +0100 +++ b/pgsql_schema.sql Tue Dec 01 20:20:59 2020 +0100 @@ -27,11 +27,12 @@ CREATE SCHEMA IF NOT EXISTS geohub; CREATE TABLE geohub.geodata ( - id text, + id text not null, lat double precision, long double precision, spd double precision, - t timestamp with time zone + t timestamp with time zone, + ele double precision );
--- a/src/main.rs Tue Dec 01 20:05:32 2020 +0100 +++ b/src/main.rs Tue Dec 01 20:20:59 2020 +0100 @@ -16,17 +16,14 @@ "%Y-%m-%d %H:%M:%S%.f", ]; for fs in fmtstrings { - println!("{} {}", fs, ts); let (naive, withtz) = ( chrono::NaiveDateTime::parse_from_str(ts.as_str(), fs).ok(), chrono::DateTime::parse_from_str(ts.as_str(), fs).ok(), ); if let Some(p) = withtz { - println!("tz: {:?}", p); return Some(p.with_timezone(&chrono::Utc)); } if let Some(p) = naive { - println!("naive: {:?}", p); let utcd = chrono::Utc.from_utc_datetime(&p); return Some(utcd); }