Closed grundoon closed 6 years ago
Yeah, you are right. There was another bug in the template data encoder that was not seeing TemplateDataRepresentable
correctly. Fixing that issue lead to dates being properly serialized as timeIntervalSince1970
.
I've changed DateFormat
to use unix epoch and added a test. Thanks!
Just noticed that the
DateFormat
tag usesDate(timeIntervalSinceReferenceDate:)
, whereas theTemplateDataRepresentable
extensionDate.convertToTemplateData
is usingtimeIntervalSince1970
– these should probably be synched up, no?Note: The recently merged https://github.com/vapor/template-kit/pull/18 uses
timeIntervalSince1970
as well, since it is just reversing the TemplateData conversion.