443 points by burntsushi 4 days ago | 102 comments | View on ycombinator
quodlibetor 4 days ago |
Dagonfly 4 days ago |
I really appreciate when a project calmly acknowledges that it's not the right tool for every use case, and is not trying to be. That's professional engineering.
Especially in the AI-age, the crucial skill will be what NOT to implement.
mgrandl 4 days ago |
ddahlen 4 days ago |
Time is such a pain, I write code for simulating orbits of asteroids/stuff in the solar system, and time and time conversions play a major roll in it. I often need accuracy at the mega-year to giga-year scales, but also sometimes micro-second relative.
I saw on this page that you at least mention TAI time, how are you handling time scales in general? Like would it be hard to add some other timescales like UT1?
Right now I have to do all of this manually and I have been using chrono as just a convenience wrapper so that my users can convert ISO time strings into my internal representation.
Edit: Oh no! I just found out chrono is being semi-deprecated, looks like I'm going to be switching...
Sebb767 3 days ago |
> Unlike “Comparison with other Rust datetime crates,” this document is opinionated. > [...] > Jiff is pronounced like “gif” with a soft “g,” as in “gem.”
Burntsushi really did not hold back with this document being opinionated :-) (Though they are right, of course).
[0] https://docs.rs/jiff/latest/jiff/_documentation/design/index...
pbrowne011 4 days ago |
[1] https://docs.rs/jiff-tzdb/latest/jiff_tzdb/#data-generation
the__alchemist 4 days ago |
poulpy123 4 days ago |
tadhunt 2 days ago |
AI wrote it under my strict design parameters. We use it in production in a high volume event production company, PRs welcome!
kjuulh 4 days ago |
brianwitte 4 days ago |
robrain 4 days ago |
tiffanyh 3 days ago |
undefined 2 days ago |
Sytten 3 days ago |
undefined 4 days ago |
i2talics 4 days ago |
Strings are also similarly gnarly topic that I find a lot of devs try to ignore.
fstephany 4 days ago |
Thank you for your work on this burntsushi!
Sparkle-san 4 days ago |
Woah now, let's not get too controversial.
arjie 4 days ago |
> Jiff is pronounced like “gif” with a soft “g,” as in “gem.”
This is classic anti-trust monopoly leveraging. Lucky I'm on this side of the debate :)
dizzant 3 days ago |
A masterclass in viral outrage bait. Not a Rustacean, I clicked the link exclusively for this nugget and will probably tell my Rust-loving colleagues about it tomorrow.
For the record, I like the converse better:
> Jiff is pronounced with a hard “g”, as in “gif”.
kodebach 3 days ago |
gosen 4 days ago |
echelon 3 days ago |
What a cardinal sin! Instantly distrust this project.
(I'm kidding, Andrew. But this is clearly the wrong pronunciation! :P)
NetOpWibby 4 days ago |
undefined 4 days ago |
PowerElectronix 4 days ago |
Levitating 3 days ago |
BetterThanSober 3 days ago |
I really, really, hate Monday
kccqzy 3 days ago |
The first problem is the bigger problem. If you are writing an app that asks the user for a zoned time, the user will want something like Nov 16 7pm eastern time. But EST is of course highly ambiguous and so is EDT. (The database actually gives EST to Panama Time and leaves EDT undefined.) The correct solution is either EST5EDT or America/New_York. Neither is user friendly. The first string EST5EDT looks like gibberish to the average user. The second raises concerns in all other cities sharing the same timezone as New York. Why not have an entry for Philadelphia or Washington D.C.? Some even say it is inherently classist to pick the city with the biggest population, not the most important by some other metric. Is New York more deserving than our nation’s political capital? Why is Los Angeles more deserving than San Francisco, other than the fact that the maintainer of the database is physically in Los Angeles? This is an actual criticism in iOS calendar app on the now defunct Apple forums. If you want the user to pick a timezone you better make sure Eastern Time is an allowed option, and maybe also include all the cities and municipalities in the zone; that’s what the newest iOS does. But in any case almost every developer now hard codes a mapping from Eastern Time to America/New_York if their audience is U.S. This feels like duplicative work better done in a library. The fact that a new library reaches 1.0 and doesn’t plan to add this might mean a lack of ambition to tackle this problem.
The second problem is the fact that the timezone definitions change according to the actual rules in effect in history. This is sometimes not what you want. Indeed I notice that most if not all date libraries use the proleptic Gregorian calendar (our current calendar system extended backwards); no library that I know of automatically switches to Julian calendars before the cutoff. Why this inconsistency? I’d argue that when most humans express a zoned time they expect the current rules to be extended backwards. People forget the daylight saving rules change in the 2000s when talking about times before that change and expect the current rules.
Not to be a detractor here for this library given the hard work of burntsushi, but we should aim higher.
3ph3m3re 3 days ago |
Do you seasoned rustaceans may explain why we don’t have such a standard library?
It’s a genuine question from an ignorant :)
amai 2 days ago |
Taiizor 3 days ago |
jheriko 4 days ago |
undefined 4 days ago |
Turns out, the reason people wanted to use it was because the API was stable and every slight step towards improvement was met with... resistance. I stopped maintaining it because the burnout from seeing what it could be and not seeing any path to get there was too much for me.
I'm extremely grateful to burntsushi for writing the datetime library rust deserves. Chrono is stable and is maintained (though semi-deprecated) by an extremely reliable rustacean -- you don't need to leave, but you'll probably be happier if you do.