Skip to content

Commit

Permalink
Restrictions on timezones only apply to older (pre-1.9) Ruby releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
philr committed Jul 27, 2018
1 parent 352c341 commit cccd70b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -60,8 +60,9 @@ of `TZInfo::Timezone`) and convert a time in UTC to local New York time:
local = tz.utc_to_local(Time.utc(2005,8,29,15,35,0))

Note that the local Time returned will have a UTC timezone (`local.zone` will
return `"UTC"`). This is because the Ruby Time class only supports two timezones:
UTC and the current system local timezone.
return `"UTC"`). This is because the Time class in older (but still supported by
TZInfo) versions of Ruby can only handle two timezones: UTC and the system local
timezone.

To convert from a local time to UTC, the `local_to_utc` method can be used as
follows:
Expand Down

0 comments on commit cccd70b

Please sign in to comment.