On Tuesday, October 26, 2021 at 12:30:59 PM UTC-5 Sage Gerard wrote:
> Yes, but I'm talking about code we were asked to give feedback on. I focus > on `tz/c` because it is documented as a flat contract that checks for "an > identifier from the IANA tz database <https://www.iana.org/time-zones>", > but it does not parse the timezone name to check correctness. > > My feedback says no validation occurs for the timezone name in a parameter > for Splitflap. Joel indicated that parameter will go away below, and I'm > glad to know of the tzinfo package. But if a limitation in gregor's > contracts would oblige you to use tzinfo for validation, then I'd want to > know that so that I can assess how much of gregor I really need. It still > seems like the timezone data is the hard part, so use a timezone dependency > instead of a dependency that misleads the user into incomplete validation > It does seem odd that tz/c uses string? instead of tzid-exists? I’m wondering if that could be changed without breaking a lot of stuff. If not, then it *might* be worth keeping my own feed-timezone parameter that allows only (integer-in -64800 64800). On the other hand, it is also true that if an invalid time zone is supplied anywhere along the way to building the feed data, an exception is going to occur before the feed is generated, which is what I care about for the most part. In general I appreciate feedback like Sage’s from people who think a lot more carefully than I do about dependencies. I like knowing that if someone has differing time zones for different items within a feed, or cares about gap/overlap resolution, etc, I can let them use gregor to handle it. It's not something I ever encountered in building CMSs or publishing podcasts, but also you never know what a feed will be used for. I will probably experiment with reducing the dependency down to tzinfo/tzdata and using Racket’s native date structs. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/ea7090cc-1ebf-40a3-a7e6-0634d038602en%40googlegroups.com.