Skip to content

Commit f4d8fc6

Browse files
authored
Merge pull request #31 from dahong67/bson-dates
Save timestamp as string for BSON
2 parents 4d8de84 + 6a699bb commit f4d8fc6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/function.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function cache(@nospecialize(f), path::AbstractString; overwrite = false)
7676
if ext == ".bson"
7777
data = Dict(
7878
:version => version,
79-
:whenrun => whenrun,
79+
:whenrun => string(whenrun),
8080
:runtime => runtime,
8181
:output => output,
8282
)

test/items/function.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
if ext == "bson"
5555
data = BSON.load(path)
5656
version = data[:version]
57-
whenrun = data[:whenrun]
57+
whenrun = DateTime(data[:whenrun])
5858
runtime = data[:runtime]
5959
else
6060
data = JLD2.load(path)

0 commit comments

Comments
 (0)