core/client/game/src/shine/support/quartz/TimeZoneUtil.cs
/// <summary>
/// Tries to find time zone with given id, has ability do some fallbacks when necessary.
/// </summary>
/// <param name="id">System id of the time zone.</param>
/// <returns></returns>
Tries to find time zone with given id, has ability do some fallbacks when necessary.
Tries to find time zone with given id has ability do some fallbacks when necessary .
public static TimeZoneInfo FindTimeZoneById(string id)
        {
            TimeZoneInfo info = null;
            try
            {
                info = TimeZoneInfo.FindSystemTimeZoneById(id);
            }
            catch (TimeZoneNotFoundException)
            {
                string aliasedId;
                if (timeZoneIdAliases.TryGetValue(id, out aliasedId))
                {
                    try
                    {
                        info = TimeZoneInfo.FindSystemTimeZoneById(aliasedId);
                    }
                    catch
                    {
                        Debug.Log("Could not find time zone using alias id " + aliasedId);
                    }
                }
                if (info == null)
                {
                    info = CustomResolver(id);
                }
                if (info == null)
                {
                    throw;
                }
            }
            return info;
        }
public static TimeZoneInfo FindTimeZoneById ( string id ) { TimeZoneInfo info = null ; try { info = TimeZoneInfo . FindSystemTimeZoneById ( id ) ; } catch ( TimeZoneNotFoundException ) { string aliasedId ; if ( timeZoneIdAliases . TryGetValue ( id , out aliasedId ) ) { try { info = TimeZoneInfo . FindSystemTimeZoneById ( aliasedId ) ; } catch { Debug . Log ( " " + aliasedId ) ; } } if ( info == null ) { info = CustomResolver ( id ) ; } if ( info == null ) { throw ; } } return info ; }
Tries to find time zone with given id, has ability do some fallbacks when necessary.
Tries to find time zone with given id has ability do some fallbacks when necessary .
// we tried our best
None
id
string
System id of the time zone.
System id of the time zone .