Skip to content

Commit

Permalink
Allow format/formatter function to take a DateTimeZone argument optio…
Browse files Browse the repository at this point in the history
…nally.
  • Loading branch information
davidsantiago authored and drone29a committed Dec 31, 2010
1 parent d05271f commit 9b5a670
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clj_time/format.clj
Expand Up @@ -36,8 +36,10 @@

(defn formatter
"Returns a custom formatter for the given date-time pattern."
[#^String fmts]
(.withZone (DateTimeFormat/forPattern fmts) #^DateTimeZone utc))
([#^String fmts]
(formatter fmts utc))
([#^String fmts #^DateTimeZone dtz]
(.withZone (DateTimeFormat/forPattern fmts) dtz)))

(defvar formatters
(into {} (map
Expand Down

0 comments on commit 9b5a670

Please sign in to comment.