Commit 1b6a25c4 authored by Sharon Urban's avatar Sharon Urban

configurable closing hour

parent d847a227
......@@ -2,19 +2,17 @@ module Timestamp
open System
open Infrastructure.Timestamp
open Config
[<Literal>]
let private DateFormat = "yyyy-MM-dd"
let private epoch = (new DateTime(1970, 1, 1, 0, 0, 0, 0))
[<Literal>]
let private ClosingHour = 16.0
let private est = TimeZoneInfo.FindSystemTimeZoneById("EST")
//TODO: handle daylight saving time. use ET instead of EST
let closingTime (date : DateTime) =
let date = DateTime.SpecifyKind(date.Date.AddHours(ClosingHour), DateTimeKind.Unspecified)
let date = DateTime.SpecifyKind(date.Date.AddHours(config.yaml.closingHour), DateTimeKind.Unspecified)
TimeZoneInfo.ConvertTimeToUtc(date, est)
|> Infrastructure.Timestamp.fromDateTime
......
......@@ -26,4 +26,5 @@ acs:
extend: 5
contract: Oracle.fst
derivationPath: "m/44'/258'/0'/3/0"
closingHour: 16.5
chain: test
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment