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

Fix timezones in feat info #958

Merged
merged 5 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion cfg_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from datacube_ows.cfg_parser_impl import main
from datacube_ows.startup_utils import initialise_debugging
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
try:
from ._version import version as __version__
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/band_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import division

Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/cfg_parser_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0

import json
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/config_toolkit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from copy import deepcopy
from typing import Any, MutableMapping
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/config_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import json
import logging
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/cube_pool.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import logging
from contextlib import contextmanager
Expand Down
6 changes: 2 additions & 4 deletions datacube_ows/data.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import

import json
import logging
import re
Expand Down Expand Up @@ -845,7 +843,7 @@ def feature_info(args):
if params.product.time_resolution.is_summary():
date_info["time"] = ds.time.begin.strftime("%Y-%m-%d")
else:
date_info["time"] = dataset_center_time(ds).strftime("%Y-%m-%d %H:%M:%S UTC")
date_info["time"] = dataset_center_time(ds).strftime("%Y-%m-%d %H:%M:%S %Z")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual bug fix.

# Collect raw band values for pixel and derived bands from styles
date_info["bands"] = _make_band_dict(params.product, pixel_ds)
derived_band_dict = _make_derived_band_dict(pixel_ds, params.product.style_index)
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/gunicorn_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
"""Gunicorn config for Prometheus internal metrics
"""
Expand Down
4 changes: 1 addition & 3 deletions datacube_ows/legend_generator.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import

import io
import logging

Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/legend_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import io
import logging
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/mv_index.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import datetime
import json
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/ogc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import sys
import traceback
Expand Down
4 changes: 1 addition & 3 deletions datacube_ows/ogc_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import, division, print_function

import traceback as tb

from flask import render_template
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/ogc_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import datetime
import logging
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/ows_cfg_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0


Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/ows_configuration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0

#
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/product_ranges.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0

#pylint: skip-file
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/protocol_versions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0

import re
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/query_profiler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from time import time

Expand Down
5 changes: 5 additions & 0 deletions datacube_ows/resource_limits.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import math
from typing import Any, Iterable, List, Mapping, Optional, Tuple, Union, cast

Expand Down
4 changes: 1 addition & 3 deletions datacube_ows/startup_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import, division, print_function

import logging
import os
import warnings
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from datacube_ows.styles.base import StyleDefBase # noqa: F401
from datacube_ows.styles.colormap import ColorMapStyleDef # noqa: F401
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0

from datacube_ows.styles.api.base import ( # noqa: F401 isort:skip
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/api/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import xarray

Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import io
import logging
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/colormap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import io
import logging
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/component.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from typing import (Any, Callable, Hashable, List, MutableMapping, Optional,
Union, cast)
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/expression.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from typing import Any, Type, cast

Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/hybrid.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from typing import Optional, Union, cast

Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/styles/ramp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import io
import logging
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/tile_matrix_sets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from datacube_ows.config_utils import OWSConfigEntry
from datacube_ows.ogc_utils import ConfigException
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/update_ranges_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0

import os
Expand Down
4 changes: 1 addition & 3 deletions datacube_ows/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import, division, print_function

import datetime
import logging
from functools import wraps
Expand Down
4 changes: 1 addition & 3 deletions datacube_ows/wcs1.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import, division, print_function

from flask import render_template

from datacube_ows.data import json_response
Expand Down
4 changes: 1 addition & 3 deletions datacube_ows/wcs1_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import, division, print_function

import numpy
import pytz
import xarray
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/wcs2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import logging

Expand Down
4 changes: 1 addition & 3 deletions datacube_ows/wcs2_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import, division, print_function

import collections
import logging

Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/wcs_scaler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from affine import Affine
from datacube.utils import geometry
Expand Down
2 changes: 1 addition & 1 deletion datacube_ows/wcs_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# Copyright (c) 2017-2023 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from datacube_ows.ogc_exceptions import WCS1Exception, WCS2Exception

Expand Down
Loading
Loading