Bug 23949 - TimeZone.CurrentTimeZone.GetDaylightChanges Start and End times do not return specific hour of dst transition
Summary: TimeZone.CurrentTimeZone.GetDaylightChanges Start and End times do not return...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.18.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: 4.18.1
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-10-20 18:10 UTC by Peter Collins
Modified: 2014-10-27 13:41 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Peter Collins 2014-10-20 18:10:21 UTC
The following code displays the specific hour in which the time transitions to and from DST when executed in a c# command line project. However when executed in an Android project, both Start and End DateTimes have an hour of 12:00am.

> var tz = TimeZone.CurrentTimeZone.GetDaylightChanges (2014);
> Console.WriteLine ("dst: " + dst.Start.ToString ("g") + " -> " + dst.End.ToString ("g"));

Expected output (EST/EDT):
> dst: 3/9/2014 2:00 AM -> 11/2/2014 2:00 AM


Actual output (EST/EDT):
> dst: 3/9/2014 12:00 AM -> 11/2/2014 12:00 AM


Environment:
OSX Yosemite / Eastern Time
XA master / f6fc4576
Comment 1 Udham Singh 2014-10-21 04:49:18 UTC
I have checked this issue with the help of instructions provided in bug
description and  below are my observations.

C# console project output:
> dst: 09-03-2014 02:00 -> 02-11-2014 02:00

Android project output:
> 09/03/2014 00:00 -> 01/11/2014 00:00

Screencast : http://www.screencast.com/t/PomV18f5Gh

Note : Checked with 'Eastern Daylight Time (GMT-04:00)'.

Environment Info :

=== Xamarin Studio ===

Version 5.5.2 (build 3)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
    Mono 3.10.0 ((detached/e204655)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 310000023

=== Apple Developer Tools ===

Xcode 6.1 (6602)
Build 6A1052c

=== Xamarin.Android ===

Version: 4.18.0 (Starter Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/android-sdk-macosx
    Supported Android versions:
        2.1    (API level 7)
        2.2    (API level 8)
        2.3    (API level 10)
        3.1    (API level 12)
        3.2    (API level 13)
        4.0    (API level 14)
        4.0.3  (API level 15)
        4.1    (API level 16)
        4.2    (API level 17)
        4.3    (API level 18)
        4.4    (API level 19)
        4.4.87 (API level 20)
        4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

=== Build Information ===

Release ID: 505020003
Git revision: 6d4c806e383ba366b15fbccca9ddc1ba94f8d5ad
Build date: 2014-10-15 15:00:36-04
Xamarin addins: 069ddd29bb70a42238142eee9bac21a5e4b2f9f9

=== Operating System ===

Mac OS X 10.10.0
Darwin Admin-Macs-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 2 Peter Collins 2014-10-21 16:40:14 UTC
This is a regression from a previously stable XA 4.14.
Comment 3 Jonathan Pryor 2014-10-23 12:13:49 UTC
Fixed in monodroid/8b57fd84
Comment 4 Mohit Kheterpal 2014-10-27 13:41:42 UTC
I have checked this issue with XA 4.18.1-1 and I am getting expected output after using code in bug description with time zone "Eastern Daylight Time (GMT-04:00)".

Android app output : dst: 09/03/2014 02:00 -> 02/11/2014 02:00
Console app output : dst: 09-03-2014 02:00 -> 02-11-2014 02:00

Hence closing this issue.