chrono::offset::Local
uses "the standard time
crate", so you can use that instead of chrono
if you want.
UtcOffset::try_current_local_offset()
should do what you need. Or try_local_offset_at()
if you need the offset as it is, was or will be at a particular moment.
If you want something from std
(or even core
), I don't think it exists. At least not in a platform-independent way.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…