Skip to content

Instantly share code, notes, and snippets.

@findepi
Last active March 5, 2017 11:25
Show Gist options
  • Save findepi/334610edf57ae6faca252ed39e92f730 to your computer and use it in GitHub Desktop.
Save findepi/334610edf57ae6faca252ed39e92f730 to your computer and use it in GitHub Desktop.
Time Zone ID support across libraries

Table shows offset in hours (on March 5th 2017) of a time zone given the input on the left, across libraries.

                  j.u.TimeZone::getTimeZone     j.t.ZoneId::of  joda.DateTimeZone::forID
            UTC                         0.0                0.0                       0.0
            GMT                         0.0                0.0                       0.0
         +01:00                         0.0                1.0                       1.0
      UTC+01:00                         0.0                1.0                -- fail --
      GMT+01:00                         1.0                1.0                -- fail --
  Europe/Warsaw                         1.0                1.0                       1.0
            CET                         1.0                1.0                       1.0
            MST                        -7.0         -- fail --                      -7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment