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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: defaults for current-datetime argument TDE-1298 #1193

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/standardise_validate.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import argparse
import os
import sys
from datetime import datetime, timezone

from linz_logger import get_log

from scripts.cli.cli_helper import InputParameterError, is_argo, load_input_files, str_to_gsd, valid_date
from scripts.datetimes import format_rfc_3339_nz_midnight_datetime_string
from scripts.datetimes import RFC_3339_DATETIME_FORMAT, format_rfc_3339_nz_midnight_datetime_string
from scripts.files.file_tiff import FileTiff
from scripts.files.files_helper import SUFFIX_JSON, ContentType
from scripts.files.fs import exists, write
Expand Down Expand Up @@ -75,7 +76,8 @@ def parse_args() -> argparse.Namespace:
"The datetime to be used as current datetime in the metadata. "
"Format: RFC 3339 UTC datetime, `YYYY-MM-DDThh:mm:ssZ`."
),
required=True,
required=False,
default=datetime.now(timezone.utc).strftime(RFC_3339_DATETIME_FORMAT),
)
return parser.parse_args()

Expand Down