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

            if service_result.is_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,
            };

            let proxy = service_result.unwrap();

            if let Err(e) = proxy.set_timezone(time_zone_id.as_str()).await {
                fx_log_err!("Failed to write timezone to fuchsia.timezone: {:?}", e);
            }
        });
    }
/// Writes the time zone setting to the timezone service.
///
/// Errors are only logged as this is an intermediate step in a migration.
/// TODO(fxb/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 .
fn write_intl_info_to_service(&self, info: IntlInfo) {
        let service_context = self.service_context_handle.clone();
        fasync::spawn(async move {
            let service_result = service_context
                .lock()
                .await
                .connect::<fidl_fuchsia_deprecatedtimezone::TimezoneMarker>()
                .await;
            if service_result.is_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,
            };
            let proxy = service_result.unwrap();
            if let Err(e) = proxy.set_timezone(time_zone_id.as_str()).await {
                fx_log_err!("Failed to write timezone to fuchsia.timezone: {:?}", e);
            }
        });
    }
fn write_intl_info_to_service ( & self , info : IntlInfo ) { let service_context = self . service_context_handle . clone ( ) ; fasync :: spawn ( async move { let service_result = service_context . lock ( ) . await . connect :: < fidl_fuchsia_deprecatedtimezone :: TimezoneMarker > ( ) . await ; if service_result . is_err ( ) { fx_log_err ! ( " " ) ; return ; } let time_zone_id = match info . time_zone_id { Some ( id ) => id , None => return , } ; let proxy = service_result . unwrap ( ) ; if let Err ( e ) = proxy . set_timezone ( time_zone_id . as_str ( ) ) . await { fx_log_err ! ( " " e ) ; } } ) ; }
Writes the time zone setting to the timezone service.
Writes the time zone setting to the timezone service .
&self
info
IntlInfo
&self
info
IntlInfo