From stephane at coupa.com Thu Nov 1 22:56:52 2012 From: stephane at coupa.com (Stephane Pelchat) Date: Thu, 1 Nov 2012 15:56:52 -0700 Subject: [TZInfo-users] Solomon Island & daylight savings time Message-ID: Hi, We have received a report that the Solomon Island timezone is being calculated as if daylight savings was observed there, but it is in fact not the case. - Using tzinfo (0.3.31) - "Pacific - Guadalcanal" - ActiveSupport::TimeZone.all returns: "(GMT+12:00) Solomon Is." But Solomon Island should be GMT+11 ( http://www.timeanddate.com/library/abbreviations/timezones/pacific/sbt.html) Any help or information on this matter would be appreciated, thanks -St?phane -------------- next part -------------- An HTML attachment was scrubbed... URL: From phil.ross at gmail.com Thu Nov 1 23:56:35 2012 From: phil.ross at gmail.com (Philip Ross) Date: Thu, 1 Nov 2012 23:56:35 +0000 Subject: [TZInfo-users] Solomon Island & daylight savings time In-Reply-To: References: Message-ID: Hi Stephane, On 1 November 2012 22:56, Stephane Pelchat wrote: > We have received a report that the Solomon Island timezone is being > calculated as if daylight savings was observed there, but it is in fact not > the case. > > - Using tzinfo (0.3.31) > - "Pacific - Guadalcanal" > - ActiveSupport::TimeZone.all returns: "(GMT+12:00) Solomon Is." > > But Solomon Island should be GMT+11 > (http://www.timeanddate.com/library/abbreviations/timezones/pacific/sbt.html) TZInfo does return an offset of GMT+11 for the Solomon Islands (Pacific/Guadalcanal) and indicates that daylight savings is not observed: > zone = TZInfo::Timezone.get('Pacific/Guadalcanal') > period = zone.period_for_utc(Time.utc(2013, 1, 1)) > period.utc_total_offset / 3600.0 => 11.0 > period.dst? => false ActiveSupport::TimeZone maps "Solomon Is." to the Asia/Magadan timezone (in the MAPPING Hash in lib/active_support/values/time_zone.rb). Since Magadan is a town in Russia that observes a timezone of GMT+12, the ActiveSupport mapping would appear to be incorrect. Kind regards, Phil From stephane at coupa.com Fri Nov 2 00:33:26 2012 From: stephane at coupa.com (Stephane Pelchat) Date: Thu, 1 Nov 2012 17:33:26 -0700 Subject: [TZInfo-users] Solomon Island & daylight savings time In-Reply-To: References: Message-ID: Thanks for the investigation Phil! I'll follow up with the ActiveSupport team, -S On Thu, Nov 1, 2012 at 4:56 PM, Philip Ross wrote: > Hi Stephane, > > On 1 November 2012 22:56, Stephane Pelchat wrote: > > We have received a report that the Solomon Island timezone is being > > calculated as if daylight savings was observed there, but it is in fact > not > > the case. > > > > - Using tzinfo (0.3.31) > > - "Pacific - Guadalcanal" > > - ActiveSupport::TimeZone.all returns: "(GMT+12:00) Solomon Is." > > > > But Solomon Island should be GMT+11 > > ( > http://www.timeanddate.com/library/abbreviations/timezones/pacific/sbt.html > ) > > TZInfo does return an offset of GMT+11 for the Solomon Islands > (Pacific/Guadalcanal) and indicates that daylight savings is not > observed: > > > zone = TZInfo::Timezone.get('Pacific/Guadalcanal') > > period = zone.period_for_utc(Time.utc(2013, 1, 1)) > > period.utc_total_offset / 3600.0 > => 11.0 > > period.dst? > => false > > ActiveSupport::TimeZone maps "Solomon Is." to the Asia/Magadan > timezone (in the MAPPING Hash in > lib/active_support/values/time_zone.rb). Since Magadan is a town in > Russia that observes a timezone of GMT+12, the ActiveSupport mapping > would appear to be incorrect. > > Kind regards, > > Phil > _______________________________________________ > TZInfo-users mailing list > TZInfo-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/tzinfo-users > -- St?phane Pelchat Development Director Coupa Software | www.coupa.com stephane at coupa.com 925.528.9848 Gartner Ranks Coupa #1 Coupa's Stellar Growth Coupa Customers *Join the conversation!* [image: LinkedIn] [image: Facebook] [image: Twitter] [image: YouTube] -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at moulton.us Fri Nov 16 03:12:26 2012 From: tom at moulton.us (Thomas A. Moulton) Date: Thu, 15 Nov 2012 22:12:26 -0500 Subject: [TZInfo-users] strftime %Z Message-ID: <50A5AF1A.4090604@moulton.us> How can I use strftime to display a time in the format "20:45 EDT" I looked at http://tzinfo.rubyforge.org/doc/classes/TZInfo/Timezone.html#M000060 and think that "%H:%M %Z" would do it, but no joy. now = DateTime.now.new_offset(0) ltime = tz.utc_to_local(now) otime = ltime.strftime("%H:%M %Z") returns "14:07 +00:00" Can anyone provide an example for me? Tom From tom at moulton.us Sat Nov 17 01:31:17 2012 From: tom at moulton.us (Thomas A. Moulton) Date: Fri, 16 Nov 2012 20:31:17 -0500 Subject: [TZInfo-users] strftime %Z In-Reply-To: <50A5AF1A.4090604@moulton.us> References: <50A5AF1A.4090604@moulton.us> Message-ID: <50A6E8E5.3070103@moulton.us> Ok I figured it out... helps to RTFM but I have to say examples help dummies in a rush (me!) otime = tz.strftime("%H:%M %Z", next_time) tom On 11/15/2012 10:12 PM, Thomas A. Moulton wrote: > How can I use strftime to display a time in the format "20:45 EDT" > > I looked at > http://tzinfo.rubyforge.org/doc/classes/TZInfo/Timezone.html#M000060 > and think that "%H:%M %Z" would do it, but no joy. > > now = DateTime.now.new_offset(0) > ltime = tz.utc_to_local(now) > otime = ltime.strftime("%H:%M %Z") > > returns "14:07 +00:00" > > Can anyone provide an example for me? > > Tom > _______________________________________________ > TZInfo-users mailing list > TZInfo-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/tzinfo-users > From gsmedley at eastlink.ca Tue Nov 27 12:08:07 2012 From: gsmedley at eastlink.ca (Garth Home) Date: Tue, 27 Nov 2012 08:08:07 -0400 Subject: [TZInfo-users] Canberra- EDT vs EST Message-ID: <50B4AD27.8030608@eastlink.ca> Hi, Using tzinfo 0.3.35. With the timezone "Australia/Canberra" the time shows +11, which is right (+10 and +1 for DST), but I get EST for the zone abbreviation. Shouldn't that be EDT? Garth Smedley From tom at moulton.us Tue Nov 27 13:14:35 2012 From: tom at moulton.us (Thomas A. Moulton) Date: Tue, 27 Nov 2012 08:14:35 -0500 Subject: [TZInfo-users] Canberra- EDT vs EST In-Reply-To: <50B4AD27.8030608@eastlink.ca> References: <50B4AD27.8030608@eastlink.ca> Message-ID: <50B4BCBB.6010802@moulton.us> Can you show a snippet of code to demonstrate this? I ask because I was working with this kind of thing and found a lot of ways to do things that did not generate an error and did not return anything useful. I think if you run the same demo code on a time 6 months from now it will also show EST. I ended up using dst? (or is it is_dst?) as part of time_period to figure out what to display and then using my own function to generate that string tom On 11/27/2012 07:08 AM, Garth Home wrote: > Hi, > > Using tzinfo 0.3.35. With the timezone "Australia/Canberra" the time shows +11, which is right (+10 > and +1 for DST), but I get EST for the zone abbreviation. Shouldn't that be EDT? > > Garth Smedley > > _______________________________________________ > TZInfo-users mailing list > TZInfo-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/tzinfo-users > > From gsmedley at eastlink.ca Tue Nov 27 13:35:56 2012 From: gsmedley at eastlink.ca (Garth Home) Date: Tue, 27 Nov 2012 09:35:56 -0400 Subject: [TZInfo-users] Canberra- EDT vs EST In-Reply-To: <50B4BCBB.6010802@moulton.us> References: <50B4AD27.8030608@eastlink.ca> <50B4BCBB.6010802@moulton.us> Message-ID: <50B4C1BC.3070707@eastlink.ca> At the moment Canberra is on DST, so I would expect the abbreviation to be EDT rather than EST, but when I run from the rails console: Time.zone = "Australia/Canberra" => "Australia/Canberra" Time.zone.now => Tue, 27 Nov 2012 22:46:23 EST +11:00 Other time zones do have different abbreviations for DST & non-DST times, "US/Eastern", for example, has EDT/EST. I can see that in the tzinfo Sydney.rb file, which Canberra is linked to, the entry for DST has "EST" as the abbreviation. This looks like a bug to me, but I'm new to tzinfo, so maybe I'm missing something. -- Garth Smedley On 27/11/2012 9:14 AM, Thomas A. Moulton wrote: > Can you show a snippet of code to demonstrate this? > > I ask because I was working with this kind of thing and found a lot of ways to do > things that did not generate an error and did not return anything useful. > > I think if you run the same demo code on a time 6 months from now it will > also show EST. > > I ended up using dst? (or is it is_dst?) as part of time_period to figure out what to display > and then using my own function to generate that string > > tom > > > On 11/27/2012 07:08 AM, Garth Home wrote: >> Hi, >> >> Using tzinfo 0.3.35. With the timezone "Australia/Canberra" the time shows +11, which is right (+10 >> and +1 for DST), but I get EST for the zone abbreviation. Shouldn't that be EDT? >> >> Garth Smedley >> >> _______________________________________________ >> TZInfo-users mailing list >> TZInfo-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/tzinfo-users >> >> > _______________________________________________ > TZInfo-users mailing list > TZInfo-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/tzinfo-users > From phil.ross at gmail.com Tue Nov 27 14:12:01 2012 From: phil.ross at gmail.com (Philip Ross) Date: Tue, 27 Nov 2012 14:12:01 +0000 Subject: [TZInfo-users] Canberra- EDT vs EST In-Reply-To: <50B4C1BC.3070707@eastlink.ca> References: <50B4AD27.8030608@eastlink.ca> <50B4BCBB.6010802@moulton.us> <50B4C1BC.3070707@eastlink.ca> Message-ID: Hi Garth, On 27 November 2012 13:35, Garth Home wrote: > I can see that in the tzinfo Sydney.rb file, which Canberra is linked to, the entry for DST has > "EST" as the abbreviation. This looks like a bug to me, but I'm new to tzinfo, so maybe I'm missing > something. The data included in TZInfo comes from the public domain Time Zone Database (http://www.iana.org/time-zones). The Time Zone Database defines the Australia/Sydney zone with the EST abbreviation for both standard and daylight saving time, where EST stands for both Eastern Standard Time and Eastern Summer Time: $ zdump -v Australia/Sydney | grep 2012 Australia/Sydney Sat Mar 31 15:59:59 2012 UTC = Sun Apr 1 02:59:59 2012 EST isdst=1 gmtoff=39600 Australia/Sydney Sat Mar 31 16:00:00 2012 UTC = Sun Apr 1 02:00:00 2012 EST isdst=0 gmtoff=36000 Australia/Sydney Sat Oct 6 15:59:59 2012 UTC = Sun Oct 7 01:59:59 2012 EST isdst=0 gmtoff=36000 Australia/Sydney Sat Oct 6 16:00:00 2012 UTC = Sun Oct 7 03:00:00 2012 EST isdst=1 gmtoff=39600 There has been some debate on the Time Zone Database mailing list about whether the abbreviations should be changed (most recently in this thread: http://mm.icann.org/pipermail/tz/2012-October/018287.html). Kind regards, Phil From gsmedley at eastlink.ca Tue Nov 27 14:48:21 2012 From: gsmedley at eastlink.ca (Garth Home) Date: Tue, 27 Nov 2012 10:48:21 -0400 Subject: [TZInfo-users] Canberra- EDT vs EST In-Reply-To: References: <50B4AD27.8030608@eastlink.ca> <50B4BCBB.6010802@moulton.us> <50B4C1BC.3070707@eastlink.ca> Message-ID: <50B4D2B5.3070900@eastlink.ca> Hi Phil, On 27/11/2012 10:12 AM, Philip Ross wrote: > There has been some debate on the Time Zone Database mailing list Thanks for the reply and the link, wow, what a can of worms. -- Garth Smedley