diff --git a/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_timePeriod.rb b/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_timePeriod.rb
index d99eba4c..35a4599b 100644
--- a/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_timePeriod.rb
+++ b/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_timePeriod.rb
@@ -65,9 +65,7 @@ def writeXML(hPeriod)
# if empty add indeterminatePosition="unknown"
unless hPeriod[:startDateTime].empty?
hDateTime = hPeriod[:startDateTime]
- dateTime = hDateTime[:dateTime]
- timeResolution = hDateTime[:dateResolution]
- dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(dateTime, timeResolution)
+ dateStr = AdiwgDateTimeFun.stringDateTimeFromDateObject(hDateTime)
@xml.tag!('gml:beginPosition', dateStr)
end
if hPeriod[:startDateTime].empty?
@@ -79,9 +77,7 @@ def writeXML(hPeriod)
# if empty add indeterminatePosition="unknown"
unless hPeriod[:endDateTime].empty?
hDateTime = hPeriod[:endDateTime]
- dateTime = hDateTime[:dateTime]
- timeResolution = hDateTime[:dateResolution]
- dateStr = AdiwgDateTimeFun.stringDateTimeFromDateTime(dateTime, timeResolution)
+ dateStr = AdiwgDateTimeFun.stringDateTimeFromDateObject(hDateTime)
@xml.tag!('gml:endPosition', dateStr)
end
if hPeriod[:endDateTime].empty?
diff --git a/test/helpers/mdJson_hash_functions.rb b/test/helpers/mdJson_hash_functions.rb
index b7bb0de2..e34d11a2 100644
--- a/test/helpers/mdJson_hash_functions.rb
+++ b/test/helpers/mdJson_hash_functions.rb
@@ -74,7 +74,8 @@ def build_dataQuality
reportReference: build_citation('standalone quality report 1'),
abstract: "standalone quality report 1"
}
-
+ # NOTE: This object should be in the file mdJson_hash_objects.rb so at some point it should be moved
+ # refer to other build_ functions for examples and references on how build_dataQuality should be structured
hDataQuality[:report] = [
{
type: 'DQ_AbsoluteExternalPositionalAccuracy',
diff --git a/test/writers/iso19115-3/tc_19115_3_temporalExtent.rb b/test/writers/iso19115-3/tc_19115_3_temporalExtent.rb
index 15f884e2..62675185 100755
--- a/test/writers/iso19115-3/tc_19115_3_temporalExtent.rb
+++ b/test/writers/iso19115-3/tc_19115_3_temporalExtent.rb
@@ -16,7 +16,7 @@ class TestWriter191151TemporalExtent < TestWriter191151Parent
# build mdJson test file in hash
mdHash = TDClass.base
- hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02','2018-05-02T08:46')
+ hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02T00:00','2018-05-02T08:46')
hTimeI = TDClass.build_timeInstant('TIID001',nil,'2018-05-02T08:48:00-00:09')
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] = []
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] << { timePeriod: hTimeP }
diff --git a/test/writers/iso19115-3/tc_19115_3_timePeriod.rb b/test/writers/iso19115-3/tc_19115_3_timePeriod.rb
index f723355b..e401947d 100755
--- a/test/writers/iso19115-3/tc_19115_3_timePeriod.rb
+++ b/test/writers/iso19115-3/tc_19115_3_timePeriod.rb
@@ -16,7 +16,7 @@ class TestWriter191151TimePeriod < TestWriter191151Parent
# build mdJson test file in hash
mdHash = TDClass.base
- hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02','2018-05-02T08:46')
+ hTimeP = TDClass.build_timePeriod('TPID001',nil,'2017-05-02T00:00','2018-05-02T08:46')
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] = []
mdHash[:metadata][:resourceInfo][:extent][0][:temporalExtent] << { timePeriod: hTimeP }
mdHash[:metadata][:resourceInfo][:extent][0].delete(:geographicExtent)
diff --git a/test/writers/iso19115-3/testData/19115_3_dataIdentification.xml b/test/writers/iso19115-3/testData/19115_3_dataIdentification.xml
index dc2259d9..d79b64db 100644
--- a/test/writers/iso19115-3/testData/19115_3_dataIdentification.xml
+++ b/test/writers/iso19115-3/testData/19115_3_dataIdentification.xml
@@ -260,7 +260,7 @@
resource time period
- 2017-12-01T00:00:00
+ 2017-12-01
@@ -607,7 +607,7 @@
resource time period
- 2017-12-01T00:00:00
+ 2017-12-01
@@ -765,8 +765,8 @@
time period identifier
period name one
period name two
- 2018-05-02T00:00:00
- 2016-12-31T00:00:00
+ 2018-05-02
+ 2016-12-31
1.1
@@ -1273,7 +1273,7 @@
resource time period
- 2017-12-01T00:00:00
+ 2017-12-01
@@ -1615,8 +1615,8 @@
time period identifier
period name one
period name two
- 2018-05-02T00:00:00
- 2016-12-31T00:00:00
+ 2018-05-02
+ 2016-12-31
1.1
@@ -1709,8 +1709,8 @@
time period identifier
period name one
period name two
- 2018-05-02T00:00:00
- 2016-12-31T00:00:00
+ 2018-05-02
+ 2016-12-31
1.1
@@ -2274,7 +2274,7 @@
resource time period
- 2017-12-01T00:00:00
+ 2017-12-01
diff --git a/test/writers/iso19115-3/testData/19115_3_extent.xml b/test/writers/iso19115-3/testData/19115_3_extent.xml
index 73074f16..fdea0545 100644
--- a/test/writers/iso19115-3/testData/19115_3_extent.xml
+++ b/test/writers/iso19115-3/testData/19115_3_extent.xml
@@ -189,7 +189,7 @@
period name one
period name two
2018-04-20T16:46
- 2016-12-31T00:00:00
+ 2016-12-31
1.1
diff --git a/test/writers/iso19115-3/testData/19115_3_leProcessStep.xml b/test/writers/iso19115-3/testData/19115_3_leProcessStep.xml
index f66ee829..2121b383 100644
--- a/test/writers/iso19115-3/testData/19115_3_leProcessStep.xml
+++ b/test/writers/iso19115-3/testData/19115_3_leProcessStep.xml
@@ -47,8 +47,8 @@
time period identifier
period name one
period name two
- 2018-06-22T00:00:00
- 2016-12-31T00:00:00
+ 2018-06-22
+ 2016-12-31
1.1
@@ -1018,8 +1018,8 @@
time period identifier
period name one
period name two
- 2018-06-22T00:00:00
- 2016-12-31T00:00:00
+ 2018-06-22
+ 2016-12-31
1.1
diff --git a/test/writers/iso19115-3/testData/19115_3_liProcessStep.xml b/test/writers/iso19115-3/testData/19115_3_liProcessStep.xml
index 19083efd..d1cb4cf5 100644
--- a/test/writers/iso19115-3/testData/19115_3_liProcessStep.xml
+++ b/test/writers/iso19115-3/testData/19115_3_liProcessStep.xml
@@ -47,8 +47,8 @@
time period identifier
period name one
period name two
- 2018-06-22T00:00:00
- 2016-12-31T00:00:00
+ 2018-06-22
+ 2016-12-31
1.1
@@ -231,8 +231,8 @@
time period identifier
period name one
period name two
- 2018-06-22T00:00:00
- 2016-12-31T00:00:00
+ 2018-06-22
+ 2016-12-31
1.1
@@ -583,8 +583,8 @@
time period identifier
period name one
period name two
- 2018-06-22T00:00:00
- 2016-12-31T00:00:00
+ 2018-06-22
+ 2016-12-31
1.1
diff --git a/test/writers/iso19115-3/testData/19115_3_mdMetadata.xml b/test/writers/iso19115-3/testData/19115_3_mdMetadata.xml
index 6bd5b89a..a2efa99d 100644
--- a/test/writers/iso19115-3/testData/19115_3_mdMetadata.xml
+++ b/test/writers/iso19115-3/testData/19115_3_mdMetadata.xml
@@ -382,7 +382,7 @@
resource time period
- 2017-12-01T00:00:00
+ 2017-12-01
diff --git a/test/writers/iso19115-3/testData/19115_3_temporalExtent.xml b/test/writers/iso19115-3/testData/19115_3_temporalExtent.xml
index 60a34741..f06a45bd 100644
--- a/test/writers/iso19115-3/testData/19115_3_temporalExtent.xml
+++ b/test/writers/iso19115-3/testData/19115_3_temporalExtent.xml
@@ -41,7 +41,7 @@
time period identifier
period name one
period name two
- 2017-05-02T00:00:00
+ 2017-05-02T00:00
2018-05-02T08:46
1.1
diff --git a/test/writers/iso19115-3/testData/19115_3_timePeriod.xml b/test/writers/iso19115-3/testData/19115_3_timePeriod.xml
index 9da4a1f9..fd7d934a 100644
--- a/test/writers/iso19115-3/testData/19115_3_timePeriod.xml
+++ b/test/writers/iso19115-3/testData/19115_3_timePeriod.xml
@@ -41,7 +41,7 @@
time period identifier
period name one
period name two
- 2017-05-02T00:00:00
+ 2017-05-02T00:00
2018-05-02T08:46
1.1
@@ -56,7 +56,7 @@
- 2017-05-02T00:00:00
+ 2017-05-02T00:00
P1Y2M3DT4H5M6S
diff --git a/test/writers/iso19115-3/testData/19115_3_usage.xml b/test/writers/iso19115-3/testData/19115_3_usage.xml
index 302e96c3..cbfd3518 100644
--- a/test/writers/iso19115-3/testData/19115_3_usage.xml
+++ b/test/writers/iso19115-3/testData/19115_3_usage.xml
@@ -44,8 +44,8 @@
time period identifier
period name one
period name two
- 2018-05-02T00:00:00
- 2016-12-31T00:00:00
+ 2018-05-02
+ 2016-12-31
1.1
@@ -139,8 +139,8 @@
time period identifier
period name one
period name two
- 2018-06-24T00:00:00
- 2016-12-31T00:00:00
+ 2018-06-24
+ 2016-12-31
1.1
@@ -150,8 +150,8 @@
time period identifier
period name one
period name two
- 2019-05-15T00:00:00
- 2016-12-31T00:00:00
+ 2019-05-15
+ 2016-12-31
1.1