You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "chrisdutz (via GitHub)" <gi...@apache.org> on 2024/05/16 08:38:21 UTC

[I] [Bug] Time-Zone problems in TimeRangeIteratorTest [iotdb]

chrisdutz opened a new issue, #12537:
URL: https://github.com/apache/iotdb/issues/12537

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
   
   
   ### Version
   
   1.3.2-SNAPSHOT
   
   ### Describe the bug and provide the minimal reproduce step
   
   The TimeRangeIteratorTest.testNaturalMonthTimeRange test is failing for me, as I am currently in a timezone Berlin/Europe which currently (16.05.2024) is at daylight-saving and hereby has a time offset of 2h and not 1h. 
   
   ### What did you expect to see?
   
   I expected the test to pass
   
   ### What did you see instead?
   
   The test failed.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Time-Zone problems in TimeRangeIteratorTest [iotdb]

Posted by "Lexert19 (via GitHub)" <gi...@apache.org>.
Lexert19 commented on issue #12537:
URL: https://github.com/apache/iotdb/issues/12537#issuecomment-4156807882

   I found a related root cause in org.apache.iotdb.db.utils.DateTimeUtils.toZoneOffset(ZoneId zoneId). It uses Instant.now() to resolve the offset: return zoneId.getRules().getOffset(Instant.now());  This makes the offset calculation dependent on the current system time instead of the specific timestamp being parsed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Time-Zone problems in TimeRangeIteratorTest [iotdb]

Posted by "Lexert19 (via GitHub)" <gi...@apache.org>.
Lexert19 commented on issue #12537:
URL: https://github.com/apache/iotdb/issues/12537#issuecomment-4163093253

   Yes, i will do it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Time-Zone problems in TimeRangeIteratorTest [iotdb]

Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on issue #12537:
URL: https://github.com/apache/iotdb/issues/12537#issuecomment-4159264763

   > I found a related root cause in org.apache.iotdb.db.utils.DateTimeUtils.toZoneOffset(ZoneId zoneId). It uses Instant.now() to resolve the offset: return zoneId.getRules().getOffset(Instant.now()); This makes the offset calculation dependent on the current system time instead of the specific timestamp being parsed.
   
   Thanks for pointing it out! Would you like to submit a PR to fix that?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Time-Zone problems in TimeRangeIteratorTest [iotdb]

Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz commented on issue #12537:
URL: https://github.com/apache/iotdb/issues/12537#issuecomment-4158466695

   We've got loads of these tests that caused issues for me in the past ... I would really love if we could setup an extra test-run (Could be weekly, monthly) that runs the testsuite with a completely different timezone to spot these types of issues.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org