-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extend checks for UTC inputs for robustness #4117
Conversation
Really dunno why we're getting this on Travis, not able to reproduce:
That snippet comes from |
Codecov Report
@@ Coverage Diff @@
## master #4117 +/- ##
=========================================
+ Coverage 99.4% 99.4% +<.01%
=========================================
Files 72 72
Lines 13685 13686 +1
=========================================
+ Hits 13604 13605 +1
Misses 81 81
Continue to review full report at Codecov.
|
I find this PR very strange in that the initial commit didn't work on Travis and the current commit does. any ideas? |
difference in code is
vs
I can't see how in the first one |
# check UTC status | ||
is_utc = function(tz) { | ||
# via grep('UTC|GMT', OlsonNames(), value = TRUE) | ||
utc_tz = c("Etc/GMT", "Etc/UTC", "GMT", "GMT-0", "GMT+0", "GMT0", "UTC") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sorted this alphabetically... perhaps we should sort it by expected frequency instead? Does %chin%
have a short-out to return once the first match is found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Good idea. If its LHS is length 1, then it should just loop through the RHS and stop early if and when it is found. Will do. (Btw, sorting the input was good thought but doesn't make any difference as it's an order-n two-pass approach using the now-well- established truelength clobber technique.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When %chin%
does short-circuit as you suggested, then yes this input should be sorted by expected frequency. Good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #4121
…s item, one tz= not needed
Closes #4116
You can confirm all these timezones are the same like: