Repository navigation
Feat: convert day-sized CLI dates with --time-zone - #5820
Ajay-Satish-01 wants to merge 5 commits into
Conversation
Signed-off-by: Ajay-Satish-01 <ajay.satishpriya@gmail.com>
|
@StuffbyYuki, please review this PR and let me know if anything is required |
|
Hey @Ajay-Satish-01 , this PR is too big. The only change we need is a CLI flag, plus Doc change should not be in macros, please add documentation changes in Please drop the context changes, the time_zone config, and the plan and macro handling. |
Relative start, end, and execution-time values are parsed as local midnight and stored as UTC. Context, config, plan, and macro variables stay on that UTC timestamp. Signed-off-by: Ajay-Satish-01 <ajay.satishpriya@gmail.com>
Thanks for letting me know. Just made new changes. Please verify if this is what you intended. |
Description
Solves #5673
Day-sized relative CLI dates such as
--start "1 week ago",today, andyesterdayare interpreted as local midnight in the timezone passed with--time-zone, then converted to UTC timestamps. After that,--startand--endare normal UTC timestamps.@start_tstzand@start_dsboth come from that UTC timestamp.--time-zoneis available onplan,render,evaluate,run,audit, andcheck_intervals"2 hours ago"and absolute dates are unchangedUTCdocs/reference/cli.mdfor the affected commandsTest Plan
pytest tests/utils/test_date.py— LA/Tokyo relative parsing,@start_dsfrom the UTC timestamp, DST spring-forward and fall-back, hour-grain phrases ignore the timezone, absolute dates stay UTCpytest tests/cli/test_cli.py::test_apply_time_zone_kwargs_converts_day_sized_bounds_to_utc tests/cli/test_cli.py::test_render_today_with_time_zone_uses_local_midnight tests/cli/test_cli.py::test_plan_accepts_time_zone_option tests/cli/test_cli.py::test_plan_rejects_invalid_time_zoneChecklist
make styleand fixed any issuesmake fast-test)git commit -s) per the DCO