[ 
https://issues.apache.org/jira/browse/CB-5210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15474704#comment-15474704
 ] 

Brent Hayashi commented on CB-5210:
-----------------------------------

This is still an issue and from testing it looks like when a timezone is 
currently in Daylight Savings that iOS adjusts the 'utc_offset' based on the 
'dst_offset' while Android does not.  Conversely when a timezone is in Standard 
Time iOS reports the utc/dst offsets properly while Android still reports a 
'dst_offset' of 3600 (1 hour)

The following was output was captured on September 8th at approx 18:00 GMT/UTC 
-0 (ie: In Daylight Savings time)

Berlin Timezone (GMT/UTC +2)
iOS: {"pattern":"M/d/yy, h:mm 
a","timezone":"GMT+2","utc_offset":7200,"dst_offset":3600}
Android: {"pattern":"M/d/yy h:mm 
a","timezone":"GMT+02:00","utc_offset":3600,"dst_offset":3600}

Vancouver, BC Timezone (GMT/UTC -7)
iOS: {"pattern":"M/d/yy, h:mm 
a","timezone":"PDT","utc_offset":-25200,"dst_offset":3600}
Android: {"pattern":"M/d/yy h:mm 
a","timezone":"PDT","utc_offset":-28800,"dst_offset":3600}

Now notice the difference when I change my date to Nov 23, 2016 (ie: switched 
back to Standard Time)

Vancouver, BC Timezone (GMT/UTC - 8)
iOS: {"pattern":"M/d/yy, h:mm 
a","timezone":"PST","utc_offset":-28800,"dst_offset":0}
Android: {"pattern":"M/d/yy h:mm 
a","timezone":"PST","utc_offset":-28800,"dst_offset":3600}

So I am in a situation where if it is Daylight Savings I have to ignore the 
'dst_offset' for iOS and if it is Standard Time I have to ignore the 
'dst_offset' for Android.  It would be nice if both of these operating systems 
could report the same offsets for the same timezones.

> utc_offset is different for Android and iOS in the same timezone
> ----------------------------------------------------------------
>
>                 Key: CB-5210
>                 URL: https://issues.apache.org/jira/browse/CB-5210
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, iOS
>    Affects Versions: 3.0.0
>         Environment: iOS 6.0.1, Android 4.2.2
>            Reporter: Ewan Summers
>            Assignee: Joe Bowser
>              Labels: features
>
> If you set both phones to the EST timezone (or any negative timezone) you'll 
> notice that the values for utc_offset in a call to 
> navigator.globalization.getDatePattern don't match for iOS and Android. 
> However I briefly tested with positive offsets and they appeared to be the 
> same for both devices.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to