Using clj-time, I can parse the date and time by doing
(def timestamp (format/parse (formatters :date-time-no-ms) "2013-06-03T23:00:00-0500")) ;=> #<DateTime 2013-06-04T04:00:00.000Z>
I can convert this back to string by doing
(unparse (formatters :year-month-day) timestamp) ;=> "2013-06-04"
This is the year, month, and day of this moment in the UTC time zone. How can I get an unparsed version of DateTime relative to a different time zone? For example, in the above example, I want to specify the UTC-5 time zone and get the string "2013-06-03". I played with from-time-zone and to-time-zone , but didn't seem to find the right combination of functions and arguments.
bdesham
source share