@@ -103,6 +103,7 @@ function cfvariable(ds,
103
103
units = _getattrib (ds,_v,_parentname," units" ,nothing ),
104
104
calendar = _getattrib (ds,_v,_parentname," calendar" ,nothing ),
105
105
maskingvalue = maskingvalue (ds),
106
+ prefer_datetime= true ,
106
107
)
107
108
108
109
v = _v
@@ -177,22 +178,21 @@ function cfvariable(ds,
177
178
)
178
179
179
180
rettype = _get_rettype (ds, calendar, fillvalue, missing_value,
180
- scaledtype,_maskingvalue)
181
+ scaledtype,_maskingvalue; prefer_datetime )
181
182
182
183
return CFVariable {rettype,ndims(v),typeof(v),typeof(attrib),typeof(storage_attrib)} (
183
184
v,attrib,storage_attrib)
184
185
185
186
end
186
187
187
188
188
- function _get_rettype (ds, calendar, fillvalue, missing_value, rettype, maskingvalue)
189
+ function _get_rettype (ds, calendar, fillvalue, missing_value, rettype, maskingvalue; prefer_datetime )
189
190
# rettype can be a date if calendar is different from nothing
190
191
if calendar != = nothing
191
192
DT = nothing
192
193
try
193
194
DT = CFTime. timetype (calendar)
194
195
# this is the only supported option for NCDatasets
195
- prefer_datetime = true
196
196
197
197
if prefer_datetime &&
198
198
(DT in (DateTimeStandard,DateTimeProlepticGregorian,DateTimeJulian))
0 commit comments