Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
UTC offset question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Cyrille  
View profile  
 More options Nov 3, 11:51 pm
From: Cyrille <cbonne...@gmail.com>
Date: Tue, 3 Nov 2009 20:51:40 -0800 (PST)
Local: Tues, Nov 3 2009 11:51 pm
Subject: UTC offset question
Hi guys,

Is UTC offset not working or am I looking at the wrong thing?

>> ActiveSupport::TimeZone.new("Wellington").utc_offset

=> 43200

43200/3600 = 12 hours

We are currently 13 hours ahead of UTC: http://www.timeanddate.com/worldclock/city.html?n=264

This is with Rails 2.2.2 and ruby 1.8.7 (2009-06-12 patchlevel 174)
[i686-darwin9.8.0], MBARI 0x8770, Ruby Enterprise Edition 20090928

Cheers.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
PaulF  
View profile  
 More options Nov 4, 12:57 am
From: PaulF <paulflewell...@gmail.com>
Date: Tue, 3 Nov 2009 21:57:50 -0800 (PST)
Local: Wed, Nov 4 2009 12:57 am
Subject: Re: UTC offset question
Hi Cyrille,

TimeZone class doesn't implement DST rules, but TimeWithZone class
does.

To get the DST offset use the TimeWithZone class

>> Time.current.utc_offset

=> 46800

But if you do the following its uses the TimeZone class

>> Time.zone.utc_offset

=> 43200

The conversation around this ticket explains its
https://rails.lighthouseapp.com/projects/8994/tickets/3037

Paul

On Nov 4, 5:51 pm, Cyrille <cbonne...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cyrille  
View profile  
 More options Nov 4, 4:42 am
From: Cyrille <cbonne...@gmail.com>
Date: Wed, 4 Nov 2009 01:42:50 -0800 (PST)
Local: Wed, Nov 4 2009 4:42 am
Subject: Re: UTC offset question
Hi Paul,

thanks for pointing that out: the discussion on the ticket makes
sense, even though a different name like "utc_offset_without_dst"
would make it clearer...

Cheers!

Cyrille

On Nov 4, 6:57 pm, PaulF <paulflewell...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google