async fn write_intl_info_to_service(&self, info: IntlInfo) {
        let service_context = Arc::clone(&self.client.get_service_context());
        fasync::Task::spawn(async move {
            let service_result =
                service_context.connect::<fidl_fuchsia_deprecatedtimezone::TimezoneMarker>().await;

            let proxy = match service_result {
                Ok(proxy) => proxy,
                Err(_) => {
                    fx_log_err!("Failed to connect to fuchsia.timezone");
                    return;
                }
            };

            let time_zone_id = match info.time_zone_id {
                Some(id) => id,
                None => return,
            };

            if let Err(e) = call_async!(proxy => set_timezone(time_zone_id.as_str())).await {
                fx_log_err!("Failed to write timezone to fuchsia.timezone: {:?}", e);
            }
        })
        .detach();
    }
/// Writes the time zone setting to the timezone service.
///
/// Errors are only logged as this is an intermediate step in a migration.
/// TODO(fxbug.dev/41639): remove this
Writes the time zone setting to the timezone service.
Errors are only logged as this is an intermediate step in a migration.
Writes the time zone setting to the timezone service . Errors are only logged as this is an intermediate step in a migration .
async fn write_intl_info_to_service(&self, info: IntlInfo) {
        let service_context = Arc::clone(&self.client.get_service_context());
        fasync::Task::spawn(async move {
            let service_result =
                service_context.connect::<fidl_fuchsia_deprecatedtimezone::TimezoneMarker>().await;
            let proxy = match service_result {
                Ok(proxy) => proxy,
                Err(_) => {
                    fx_log_err!("Failed to connect to fuchsia.timezone");
                    return;
                }
            };
            let time_zone_id = match info.time_zone_id {
                Some(id) => id,
                None => return,
            };
            if let Err(e) = call_async!(proxy => set_timezone(time_zone_id.as_str())).await {
                fx_log_err!("Failed to write timezone to fuchsia.timezone: {:?}", e);
            }
        })
        .detach();
    }
async fn write_intl_info_to_service ( & self , info : IntlInfo ) { let service_context = Arc :: clone ( & self . client . get_service_context ( ) ) ; fasync :: Task :: spawn ( async move { let service_result = service_context . connect :: < fidl_fuchsia_deprecatedtimezone :: TimezoneMarker > ( ) . await ; let proxy = match service_result { Ok ( proxy ) => proxy , Err ( _ ) => { fx_log_err ! ( " " ) ; return ; } } ; let time_zone_id = match info . time_zone_id { Some ( id ) => id , None => return , } ; if let Err ( e ) = call_async ! ( proxy set_timezone ( time_zone_id as_str ( ) ) ) . await { fx_log_err ! ( " " e ) ; } } ) . detach ( ) ; }
Writes the time zone setting to the timezone service.
Writes the time zone setting to the timezone service .
&self
info
IntlInfo
&self
info
IntlInfo