Skip to content

Commit

Permalink
fixes #56
Browse files Browse the repository at this point in the history
was a js error while parsing bad (early datetime) like 24:10:12.999 → what happens when using bad format and working late :D
  • Loading branch information
andypetrella committed Dec 30, 2014
1 parent 49e83fc commit a5db8f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/notebook/NBSerializer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object NBSerializer {

case class Metadata(name: String, user_save_timestamp: Date = new Date(0), auto_save_timestamp: Date = new Date(0))
implicit val metadataFormat:Format[Metadata] = {
val f = new java.text.SimpleDateFormat("yyyy-MM-dd'T'kk:mm:ss.SSS'Z'")
val f = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
val r:Reads[Metadata] = (
(JsPath \ "name").read[String] and
(JsPath \ "user_save_timestamp").read[String].map(x => f.parse(x)) and
Expand Down
4 changes: 2 additions & 2 deletions conf/notebooks/Streaming+Example.snb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"metadata" : {
"name" : "Streaming Example",
"user_save_timestamp" : "2014-12-23T24:59:40.737Z",
"auto_save_timestamp" : "2014-12-23T24:59:01.720Z"
"user_save_timestamp" : "2014-12-23T00:59:40.737Z",
"auto_save_timestamp" : "2014-12-23T00:59:01.720Z"
},
"worksheets" : [ {
"cells" : [ {
Expand Down

0 comments on commit a5db8f4

Please sign in to comment.