Skip to content

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Oct 9, 2025

Date-only inputs now default to midnight UTC instead of using current time
Fixes #198

Copilot AI review requested due to automatic review settings October 9, 2025 08:04
@Marenz Marenz requested review from a team as code owners October 9, 2025 08:04
@github-actions github-actions bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:cli Affects the command-line interface part:dispatcher labels Oct 9, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes the behavior of date-only CLI timestamp inputs to use midnight UTC instead of preserving the current time. This ensures consistent and predictable behavior when users provide only a date without a specific time.

  • Modified FuzzyDateTime to detect date-only inputs and set them to midnight UTC
  • Added comprehensive test coverage for both date-only and date-time inputs
  • Updated release notes to document the new behavior

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/frequenz/client/dispatch/_cli_types.py Added logic to detect date-only parsing and set time to midnight UTC
tests/test_cli.py Added test cases to verify date-only inputs are set to midnight
RELEASE_NOTES.md Documented the new feature in release notes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Marenz Marenz force-pushed the better-cli-timestamps branch from 1656fcb to 4269fc4 Compare October 9, 2025 08:04
… time

Date-only inputs now default to midnight UTC instead of using current time

Signed-off-by: Mathias L. Baumann <[email protected]>
@Marenz Marenz force-pushed the better-cli-timestamps branch from 4269fc4 to 6bb7e1c Compare October 9, 2025 08:40
@Marenz Marenz enabled auto-merge October 9, 2025 08:40
@Marenz Marenz added this pull request to the merge queue Oct 10, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 12330a5 Oct 10, 2025
5 checks passed
@Marenz Marenz deleted the better-cli-timestamps branch October 10, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:cli Affects the command-line interface part:dispatcher part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: Interpretation of "--end-time-to 2025-08-06" will use the current time instead of 00:00

2 participants