Hacker News new | ask | show | jobs
by quickthrower2 1347 days ago
When dealing with any date-time library in any platform I find it best to reread the documentation almost every time I use it.
3 comments

I bet you learned that the hard way.

It's surprising how poorly the situation with timezones is understood in the industry.

It doesn't surprise me. Timezones - and dates and time in general - are extremely complicated. Deceptively so. Although we interact with timezones, dates, and time every day, we don't think about layers of complexity and edge cases. More importantly, we don't practice them.

We have courses about compilers, databases, data structures, algorithms, cryptography. It's surprising we don't have courses about dates and time.

It's not surprising they didn't make an appearance in the academic world. They are utterly boring. Insanely complex, of course, but there's nothing that can be built upon. Everything in a CS curriculum is an extendable domain
Yes .NET's DateTimeOffset was my baptism. See https://stackoverflow.com/questions/4331189/datetime-vs-date.... So confusing. Definitely readying that SO post again if I need to use it.
Same here - it's why I like working with languages which feature IntelliSense. The documentation is right there in your IDE as you're working.
True but often you need something to explain at a bit more of an overview level. Intelisense helps when you know the object and want to explore the methods.
I’d second that recommendation.