Skip to content

Commit d662332

Browse files
committed
force date format to include milliseconds also close #541
1 parent 4a99da4 commit d662332

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/entities/DFGFactor.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ mutable struct GenericFunctionNodeData{T<:Union{PackedInferenceType, FunctorInfe
4343
solveInProgress::Int
4444

4545
# TODO deprecate all these inner constructors at end of DFG v0.9.x (was added for GFND.nullhypo::Float64 breaking change)
46-
GenericFunctionNodeData{T}() where T = new{T}()
4746
GenericFunctionNodeData{T}(el,po,ed,fn,mu::Vector{<:Real},ce::Vector{Int},so::Int) where T = new{T}(el,po,ed,fn,mu,ce,0.0,so)
4847
GenericFunctionNodeData{T}(el,po,ed,fn,mu::Vector{<:Real},ce::Vector{Int},nu::Real,so::Int) where T = new{T}(el,po,ed,fn,mu,ce,nu,so)
4948
end

src/services/Serialization.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const TYPEKEY = "_type"
88
function packVariable(dfg::G, v::DFGVariable)::Dict{String, Any} where G <: AbstractDFG
99
props = Dict{String, Any}()
1010
props["label"] = string(v.label)
11-
props["timestamp"] = string(v.timestamp)
11+
props["timestamp"] = Dates.format(v.timestamp, "yyyy-mm-ddTHH:MM:SS.ssszzz")#string(v.timestamp)
1212
props["nstime"] = string(v.nstime.value)
1313
props["tags"] = JSON2.write(v.tags)
1414
props["ppeDict"] = JSON2.write(v.ppeDict)
@@ -114,7 +114,7 @@ function packFactor(dfg::G, f::DFGFactor)::Dict{String, Any} where G <: Abstract
114114
# Construct the properties to save
115115
props = Dict{String, Any}()
116116
props["label"] = string(f.label)
117-
props["timestamp"] = string(f.timestamp)
117+
props["timestamp"] = Dates.format(f.timestamp, "yyyy-mm-ddTHH:MM:SS.ssszzz")#string(f.timestamp)
118118
props["nstime"] = string(f.nstime.value)
119119
props["tags"] = JSON2.write(f.tags)
120120
# Pack the node data

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ push!(ENV,"DFG_USE_CGDFG"=>"true")
55
using DistributedFactorGraphs
66
using Pkg
77
using Dates
8+
using TimeZones
89

910
## To run the IIF tests, you need a local Neo4j with user/pass neo4j:test
1011
# To run a Docker image

0 commit comments

Comments
 (0)