def get_datetime_from_dataset()

in sdap/processors/callncra.py [0:0]


    def get_datetime_from_dataset(self, dataset_path):
        with Dataset(dataset_path) as dataset_in:
            time_units = getattr(dataset_in[self.time_var_name], 'units', None)
            calendar = getattr(dataset_in[self.time_var_name], 'calendar', 'standard')
            thedatetime = num2date(dataset_in[self.time_var_name][:].item(), units=time_units, calendar=calendar)
        return thedatetime