class_docstr: Tests for applying Sun-Earth distance correction to reflectance.
docstr: Test the retrieval of scene time from a dataset.
code: def test_get_utc_time(self):
      """Test the retrieval of scene time from a dataset."""
      # First check correct time is returned with 'start_time'
      tmp_array = self.raw_refl.copy()
      del tmp_array.attrs["scheduled_time"]
      utc_time = hf.get_array_date(tmp_array, None)
      assert utc_time == self.test_date
  
      # Now check correct time is returned with 'scheduled_time'
      tmp_array = self.raw_refl.copy()
      del tmp_array.attrs["start_time"]
      utc_time = hf.get_array_date(tmp_array, None)
      assert utc_time == self.test_date
  
      # Now check correct time is returned with utc_date passed
      tmp_array = self.raw_refl.copy()
      new_test_date = datetime(2019, 2, 1, 15, 2, 12)
      utc_time = hf.get_array_date(tmp_array, new_test_date)
      assert utc_time == new_test_date
  
      # Finally, ensure error is raised if no datetime is available
      tmp_array = self.raw_refl.copy()
      del tmp_array.attrs["scheduled_time"]
      del tmp_array.attrs["start_time"]
      with pytest.raises(KeyError):
          hf.get_array_date(tmp_array, None)
  
imports: import os
  import unittest
  from datetime import datetime
  from unittest import mock
  import dask.array
  import numpy
  import numpy.testing
  import pyresample.geometry
  import pytest
  import xarray
  from fsspec.implementations.memory import MemoryFile, MemoryFileSystem
  from pyproj import CRS
  from satpy.readers import FSFile
  from satpy.readers import utils
label_desc: Use image node_id 2 for calling the TestSunEarthDistanceCorrection obj's underlying member method code with example usage: obj.test_get_utc_time() without return types