Daylight Savings again

22 views
Skip to first unread message

Cato Nano

unread,
Jul 14, 2015, 11:28:20 AM7/14/15
to clj-...@googlegroups.com
I'm trying to parse this datetime

"25/03/2012 2.00"

I'm in the Europe/Rome time stripe

This is my code

(let
   [multiparser
       (f/formatter (t/default-time-zone) "dd/MM/YYYY HH.mm" "YYYY-MM-dd HH:mm:ss")] ...


and then

(f/parse multiparser "25/03/2012 2.00")

gives me an exception

IllegalInstantException Cannot parse "25/03/2012 2.00": Illegal instant due to time zone offset transition (Europe/Rome)  org.joda.time.format.DateTimeParserBucket.computeMillis (DateTimeParserBucket.java:471)


I read here https://stackoverflow.com/questions/26162702/cannot-parse-datetime-illegal-instant-due-to-time-zone-offset-transition-euro?rq=1


that parseLocalDateTime could solve the problem


How do I deal with this wit clj-time ?

Reply all
Reply to author
Forward
0 new messages