import java.time._
import java.time.format._
import scala.util.control._
def toString(dt: ZonedDateTime): String = DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(date)
def parse(s: String): Option[ZonedDateTime] = {
try {
Some(ZonedDateTime.parse(s, DateTimeFormatter.ISO_OFFSET_DATE_TIME))
} catch {
case NonFatal(e) => {
None
}
}
}