Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

TimeZoneInfo Cleanup #2408

Merged
merged 1 commit into from
Dec 24, 2016
Merged

TimeZoneInfo Cleanup #2408

merged 1 commit into from
Dec 24, 2016

Commits on Dec 24, 2016

  1. TimeZoneInfo Cleanup

    Some cleanup in CoreRT's TimeZoneInfo implementation:
    
    - The CachedData locking is currently inconsistent. Some code is using a
    private Lock object with LockHolder.Hold, while other code is locking
    against the CachedData instance. This change removes the private Lock
    object and just locks against the CachedData instance throughout, which
    is consistent with the CoreCLR implementation.
    
    - TimeZoneInfoComparer is being used in two places in CoreRT to sort the
    list of system time zones, whereas it's only used in one place in
    CoreCLR. This change refactors the code to have a shared implementation
    of GetSystemTimeZones in CoreRT that handles the sorting in one place,
    allowing a single Comparison<T> lambda to be used, which matches the
    CoreCLR implementation. Now there is a single shared GetSystemTimeZones
    implementation which calls a private static PopulateAllSystemTimeZones
    method, which is implemented separately for Win32/WinRT/Unix.
    
    - The WinRT implementation of FindSystemTimeZoneById was accessing the
    cached data without any locking. Added locking.
    justinvp committed Dec 24, 2016
    Configuration menu
    Copy the full SHA
    785504c View commit details
    Browse the repository at this point in the history