public static async Task <TimeZone> GetTimeZoneOrDefault(this ITimeZoneService timeZoneService, string code) { if (string.IsNullOrEmpty(code)) { return(await timeZoneService.GetDefaultTimeZone()); } return(await timeZoneService.GetTimeZone(code) ?? await timeZoneService.GetDefaultTimeZone()); }
public static Task <TimeZone> GetDefaultTimeZone(this ITimeZoneService timeZoneService) { return(timeZoneService.GetTimeZone("AUS Eastern Standard Time")); }