timeutil: allow certain timezone names to be case insensitive#57250
timeutil: allow certain timezone names to be case insensitive#57250craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
7ca6b66 to
a5f669c
Compare
knz
left a comment
There was a problem hiding this comment.
I'm glad for the added fnctionality, but I think you can be more clever on the implementation.
The key observation is that you only needs the names, not the actual tzdata. So why don't you simply make a generator program that lists the contents of zoneinfo.zip and creates a go map (lowercase -> normal case) based on that? This could even be re-generated on every build, since we can assume that every Go toolchain will have zoneinfo.zip at a fixed location relative to $GOROOT.
Reviewed 7 of 7 files at r1.
Reviewable status:complete! 0 of 0 LGTMs obtained
a5f669c to
c4b583a
Compare
|
ah didn't realise it was in $GOROOT! fixed! |
knz
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r2.
Reviewable status:complete! 0 of 0 LGTMs obtained
knz
left a comment
There was a problem hiding this comment.
Wait you need to remove the entries that are just for directories, e.g. artic/
Reviewable status:
complete! 0 of 0 LGTMs obtained
Release note (sql change): Previously, timezones must be entered in the same case as it is stored on the system. Now, timezone names can be case insensitive provided it matches well known zone names according to Go's time/tzdata package.
c4b583a to
00f97bc
Compare
|
gotcha, done! |
knz
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r3.
Reviewable status:complete! 0 of 0 LGTMs obtained
knz
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained
|
cheers bors r=knz |
|
Build succeeded: |
Resolves #36847
Release note (sql change): Previously, timezones must be entered in the
same case as it is stored on the system. Now, timezone names can be case
insensitive provided it matches well known zone names according to Go's
time/tzdata package.