From cccd70b9448e7ba482b83f4dbddc6d2d60af4ee8 Mon Sep 17 00:00:00 2001 From: Phil Ross Date: Fri, 27 Jul 2018 20:13:02 +0100 Subject: [PATCH] Restrictions on timezones only apply to older (pre-1.9) Ruby releases. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 05bbbfe5..e190143f 100644 --- a/README.md +++ b/README.md @@ -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: