Last active
May 11, 2017 02:22
-
-
Save ScalaWilliam/b8c2741b72dc3c24c8f0c7ce6203b16a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.nio.file.Files.lines( | |
java.nio.file.Paths.get("/dev/stdin") | |
).map(function (line) { | |
var time = line.substring(0, line.indexOf(" ")) | |
var payload = line.substring(line.indexOf(" ") + 1); | |
var instant = java.time.LocalDateTime.parse(time).atZone(java.time.ZoneId.of("Europe/Paris")).toInstant() | |
var newTimeStr = java.time.format.DateTimeFormatter.ISO_INSTANT.format(instant); | |
return [newTimeStr, "aura.woop.ac:10000", payload].join("\t"); | |
}) | |
.forEach(print); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.nio.file.Files.lines( | |
java.nio.file.Paths.get("/dev/stdin") | |
).map(function (line) { | |
var time = line.substring(0, line.indexOf(" ")) | |
var payload = line.substring(line.indexOf(" ") + 1); | |
var instant = java.time.LocalDateTime.parse(time).atZone(java.time.ZoneId.of("Europe/Paris")).toInstant() | |
var newTimeStr = java.time.format.DateTimeFormatter.ISO_INSTANT.format(instant); | |
return [newTimeStr, "aura.woop.ac:28763", payload].join("\t"); | |
}) | |
.forEach(print); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment