Appdynamics / Appdynamics/AppDynamics.DEXTER

Specific Date and Time not being recognized

Open
#142 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
85
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When I invoke Dexter with TODAY and CURRENT_HOUR, everything works fine. When I supply a specific date and specific time, I can see in the output that the values are parsed correctly. However, the Date resolves to that Date GMT at midnight, with a local time of the previous day, adjusted by our offset (GMT-6). When it pairs the Date up with the Time, it's using the Local Date (1 day earlier) instead of the Date I pass in..

Parsed MarkDate '2021-11-16Z' as '2021-11-16T00:00:00.0000000Z', local '2021-11-15T18:00:00.0000000-06:00'
Parsed MarkTime '21:00:00Z' as '2021-11-16T21:00:00.0000000Z', local '2021-11-16T15:00:00.0000000-06:00'
Parsed Duration '-1:00:00' as '-01:00:00'
DateTimeMark '2021-11-15T21:00:00.0000000Z', local '2021-11-15T15:00:00.0000000-06:00'

**To Reproduce**
Steps to reproduce the behavior:
Invoke Dexter with Date: 2021-11-16Z and Time: 21:00:00Z and Duration: -1:00:00

**Expected behavior**
The Date parse would be the date used

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: macOS
- .NET Framework Type Core (Not Core Portable)
- .NET/.NET Core Framework Version

**Logs**
2021-11-16 16:41:03.355 INFO 7351 --- [ool-20-thread-1] c.g.c.s.a.d.DexterExecutor : Parsed MarkDate '2021-11-16Z' as '2021-11-16T00:00:00.0000000Z', local '2021-11-15T18:00:00.0000000-06:00'
2021-11-16 16:41:03.355 INFO 7351 --- [ool-20-thread-1] c.g.c.s.a.d.DexterExecutor : Parsed MarkTime '21:00:00Z' as '2021-11-16T21:00:00.0000000Z', local '2021-11-16T15:00:00.0000000-06:00'
2021-11-16 16:41:03.355 INFO 7351 --- [ool-20-thread-1] c.g.c.s.a.d.DexterExecutor : Parsed Duration '-1:00:00' as '-01:00:00'
2021-11-16 16:41:03.355 INFO 7351 --- [ool-20-thread-1] c.g.c.s.a.d.DexterExecutor : DateTimeMark '2021-11-15T21:00:00.0000000Z', local '2021-11-15T15:00:00.0000000-06:00'
2021-11-16 16:41:03.355 INFO 7351 --- [ool-20-thread-1] c.g.c.s.a.d.DexterExecutor : DateTimeMarkPlusDuration '2021-11-15T20:00:00.0000000Z', local '2021-11-15T14:00:00.0000000-06:00'
2021-11-16 16:41:03.356 INFO 7351 --- [ool-20-thread-1] c.g.c.s.a.d.DexterExecutor : UTC Input.TimeRange.From='2021-11-15T20:00:00.0000000Z' to Input.TimeRange.To='2021-11-15T21:00:00.0000000Z'
2021-11-16 16:41:03.356 INFO 7351 --- [ool-20-thread-1] c.g.c.s.a.d.DexterExecutor : Local Input.TimeRange.From='2021-11-15T14:00:00.0000000-06:00' to Input.TimeRange.To='2021-11-15T15:00:00.0000000-06:00'

From the generated jobParameters.json:

{
"Input": {
"TimeFrame": {
"MarkDate": "2021-11-16Z",
"MarkTime": "20:00:00Z",
"Duration": "-1:00:00"
},
"TimeRange": {
"From": "2021-11-15T19:00:00Z",
"To": "2021-11-15T20:00:00Z"
},
"HourlyTimeRanges": [
{
"From": "2021-11-15T19:00:00Z",
"To": "2021-11-15T20:00:00Z"
}
],

**Reports**
Include any produced reports that you have issues with

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Dexter invocation with MarkDate 2021-11-16Z, MarkTime 21:00:00Z, and Duration -1:00:00, then inspect the logged parsed values and generated jobParameters.json. Done means the supplied date remains November 16 when combined with the time and the resulting UTC and local time ranges use that date.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.