MycroftAI / lingua-franca

Mycroft's multilingual text parsing and formatting library
Apache License 2.0
75 stars 79 forks source link

backport TZ fixes from downstream #209

Open ChanceNCounter opened 3 years ago

ChanceNCounter commented 3 years ago

This attempts to fix #203 using portions of HelloChatterbox#32. All tests pass on my computer, but they were already doing that. Paging @forslund.

ChanceNCounter commented 2 years ago

Review changes: Irrelevant funcs removed. Default TZ set to UTC.

ChanceNCounter commented 2 years ago

Having lost the (internal) single source of truth, I'd just as happily clobber naive DTs to the system TZ. The problem arises in the broader ecosystem. The original reason I suggested using LF.time as the source of truth was to ensure that configs and API params would have something to query that only changes on config. If we're comfortable trusting the system clock, and allowing everything to fail in the cases where that fails, alright. That's what all the downstream cores seem to be doing.