-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[pkg/ottl] Support Minute/Day/Month/Year for time.Time's in OTTL #33106
Labels
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This was referenced May 20, 2024
TylerHelmuth
pushed a commit
that referenced
this issue
May 22, 2024
**Description:** This adds in a `Year` converter that takes a `time.Time` and returns the int month component. Analogous to what we already have with `Hour` **Link to tracking Issue:** #33106 **Testing:** Added two unit tests based on the existing `Hour` ones **Documentation:** Added the new converter to the ottlfuncs README.md --------- Signed-off-by: sinkingpoint <colin@quirl.co.nz>
TylerHelmuth
pushed a commit
that referenced
this issue
May 22, 2024
**Description:** This adds in a `Month` converter that takes a `time.Time` and returns the int month component. Analogous to what we already have with `Hour` **Link to tracking Issue:** #33106 **Testing:** Added two unit tests based on the existing `Hour` ones **Documentation:** Added the new converter to the ottlfuncs README.md --------- Signed-off-by: sinkingpoint <colin@quirl.co.nz>
evan-bradley
added a commit
that referenced
this issue
May 22, 2024
**Description:** This adds in a `Day` converter that takes a `time.Time` and returns the int day component. Analogous to what we already have with `Hour` **Link to tracking Issue:** #33106 **Testing:** Added two unit tests based on the existing `Hour` ones **Documentation:** Added the new converter to the ottlfuncs README.md --------- Signed-off-by: sinkingpoint <colin@quirl.co.nz> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
@sinkingpoint do you want to do one more for |
Yep! #33200 |
evan-bradley
pushed a commit
that referenced
this issue
May 28, 2024
**Description:** This adds in a Minute converter that takes a time.Time and returns the int minute component. Analogous to what we already have with Hour **Link to tracking Issue:** #33106 **Testing:** Added two unit tests based on the existing Hour ones **Documentation:** Added the new converter to the ottlfuncs README.md --------- Signed-off-by: sinkingpoint <colin@quirl.co.nz> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Under #29468 we currently support
Hour
as a method to get the Hour from a time.Time , but we don't support any other converters to get the other components of the time.Specifically, I want the day/month/year so that I can use the new grouping support in the file exporter to output "$day/$month/$year.log" files
Describe the solution you'd like
We should fill in the other components, mapping to the
Minute
,Day
,Month
, andYear
methods that go supports ontime.Time
sDescribe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: