private val queryTime = MutableLiveData<ZonedDateTime>(ZonedDateTimeUtils.now()) val availableMovies: LiveData<List<Movie>> = Transformations.switchMap(queryTime) { movieDao.selectAvailableMovies(it) } override fun onCreate(savedInstanceState: Bundle?) { availableArticles.observe(this, Observer { articles -> // update() method を叩くと、ここに新しいデータが来る } } fun update() { // ZonedDateTimeUtils.now().formatString() は現在時刻を String で返す viewModel.queryTime.value = ZonedDateTimeUtils.now() } }