daemonwrangler has quit [Quit: ZNC 1.8.2 - https://znc.in]
daemonwrangler has joined #crystal-lang
hendursa1 has joined #crystal-lang
hendursaga has quit [Ping timeout: 240 seconds]
_ht has joined #crystal-lang
DTZUZU_ has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
<olbat>
Hey guys, sorry to bother you again (hopefully this will by the last MR of my MR streak), I need someone from the core team to review/merge this one: https://github.com/crystal-lang/crystal_lib/pull/74 . Thank in advance :)
alexherbo2 has joined #crystal-lang
<FromGitter>
<asterite> Merged!
<olbat>
Thanks! <3
postmodern has quit [Quit: Leaving]
<astronavt>
hello crystal people - i was discussing date/time library stuff with someone, and they pointed out that crystal will let you instantiate "ambiguous" Time objects that could correspond to 2 different unix timestamps, such as `Time.local(2021, 11, 7, 1, 30, 0, location: Time::Location.load("America/New_York"))` which could correspond to 01:30 *before* the DST transition on that day, or *after*
<astronavt>
in this case it looks like it chooses the former (-4:00), but is there some way to handle this ambiguity? or is the answer to use explicit offsets if that level of precision is required, instead of going by the tz location name?
<FromGitter>
<Blacksmoke16> any reason to not just use `UTC` or unix timestamps if you need that precision?
f1refly has joined #crystal-lang
<straight-shoota>
astronavt, Time instances themselves are always unambiguos. The only thing that is ambiguous is the transformation from a calendrical representation.
<straight-shoota>
So to disambiguate that transformation process, you need to use unambiguous time zon information. A location that observes daylight savings time is inheretly ambiguous at a backwards shift.
<straight-shoota>
If you have an ambiguous calendrical representation `2021-11-07 01:30:00`, you'll have to provide a precise time zone offset (like -4:00 offset)
<straight-shoota>
After initializing the instance, you can then apply the desired named time zone in order to not keep a static offset but follow the specific time zone rules
alexherbo2 has joined #crystal-lang
f1refly has quit [Quit: see ya in hell]
Nekka has quit [Ping timeout: 246 seconds]
Nekka has joined #crystal-lang
f1refly has joined #crystal-lang
<FromGitter>
<Blacksmoke16> is dark theme on the forums broken for anyone else?