Created
September 17, 2014 00:02
-
-
Save CampingScorpion/861300fc3c2c460b6629 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
(defn set-default-timezone | |
"Why: because when we read the data out of Redshift, the java.sql.Timestamps | |
that are retrieved will pickup the (TimeZone/getDefault). | |
This kind of thing must also be done in any reporting that pulls this data. | |
At which time should be calling to that production code instead of this test | |
setup HACK." | |
[test-fn] | |
(let [original-tz (TimeZone/getDefault)] | |
(try | |
(TimeZone/setDefault (TimeZone/getTimeZone "UTC")) | |
(test-fn) | |
(finally | |
(TimeZone/setDefault original-tz))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment