Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interval not being triggered because of different time zone #4594

Closed
jackchenjc opened this issue Jun 19, 2023 · 3 comments 路 Fixed by #4595
Closed

Interval not being triggered because of different time zone #4594

jackchenjc opened this issue Jun 19, 2023 · 3 comments 路 Fixed by #4595
Assignees
Labels
bug Something isn't working

Comments

@jackchenjc
Copy link
Contributor

馃悶 Bug Report

Affected Services [REQUIRED]

The issue is located in: support-scheduler

Is this a regression?

No

Description and Minimal Reproduction [REQUIRED]

  1. Deploy EdgeX.
  2. Create interval with start time set to current time.
POST http://localhost:59861/api/v3/interval
[
   {
      "interval":{
         "name":"interval_1679737508110",
         "start":"20230619T080000",
         "interval":"5s"
      },
      "apiVersion":"v3"
   }
]

Found that the new created interval was not being triggered if the start time (20230619T080000 UTC+8 based on my location) is later then the actual UTC time (which is 20230619T000000 in this case).

The support-scheduler service should compare the interval start time with current time in local time zone.

馃敟 Exception or Error

n/a

馃實 Your Environment

Deployment Environment:
macOS

EdgeX Version [REQUIRED]:
main

Anything else relevant?

@jackchenjc jackchenjc added the bug Something isn't working label Jun 19, 2023
jackchenjc added a commit to jackchenjc/edgex-go that referenced this issue Jun 21, 2023
Fixes edgexfoundry#4594

Signed-off-by: Jack Chen <jack@iotechsys.com>
jackchenjc added a commit to jackchenjc/edgex-go that referenced this issue Jun 21, 2023
Fixes edgexfoundry#4594

Signed-off-by: Jack Chen <jack@iotechsys.com>
@lenny-goodell
Copy link
Member

@cloudxxx8 , need to add this as a known bug here: https://wiki.edgexfoundry.org/display/FA/Minnesota#Minnesota-KnownBugs

Do we have a work around? i.e use UTC for start time.
Is this a breaking change for those that figured out they have to use UTC for start time?

@cloudxxx8
Copy link
Member

@lenny-intel from my point of view, it's a real bug. Users create interval with Unix Timestamp (int64) calculated by their local time, and they expect it can work with the local time. Our document doesn't mention it's UTC.
We should pay attention on any timestamp related cases in the future. If their machine is using UTC+0, everything would still work fine.
I just added to the Minnesota known bugs.

@cloudxxx8
Copy link
Member

Oh, my bad, it's not Unix Timestamp.
Either way, since our document doesnt' state it's UTC, no one should expect it's UTC unless their timezone is UTC.

jackchenjc added a commit to jackchenjc/edgex-docs that referenced this issue Jun 28, 2023
corresponding change of edgexfoundry/edgex-go#4594

Signed-off-by: Jack Chen <jack@iotechsys.com>
mpvats-intel pushed a commit to EdgeX-Camera-Management/edgex-docs that referenced this issue Jul 24, 2023
corresponding change of edgexfoundry/edgex-go#4594

Signed-off-by: Jack Chen <jack@iotechsys.com>
Signed-off-by: Mudit Vats <mudit.vats@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants