Skip to content

Commit

Permalink
feat(SysTime): add support to parse SysTime
Browse files Browse the repository at this point in the history
  • Loading branch information
tirithen committed Jan 17, 2020
1 parent dd70f48 commit 17f897b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/vibe/data/bson.d
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,10 @@ struct Bson {
const ubyte[16] b = bbd.rawData;
return UUID(b);
}
else static if (is(T == SysTime)) {
checkType(Type.date);
return BsonDate(fromBsonData!long(m_data)).toSysTime();
}
else static assert(false, "Cannot cast "~typeof(this).stringof~" to '"~T.stringof~"'.");
}

Expand Down

0 comments on commit 17f897b

Please sign in to comment.