title: the date class from the real time database is not filled in
body: <p>I can't fill in the date class from the database. I don't understand why it doesn't work, everything seems to be written correctly.
  In the initUser function, the date of the User Model class is filled in, but if you write the USER variable to println, it will be empty. Below is the code of the MainActivity class, which has the initUser function</p>
  <pre><code>class MainActivity : AppCompatActivity() {
  
  private lateinit var btn_settings: ImageButton
  private lateinit var btn_add_friend: ImageButton
  private lateinit var btn_search_main: ImageView
  private lateinit var search_main: EditText
  private lateinit var nickname_main: TextView
  private lateinit var Id_main: TextView
  
  
  override fun onCreate(savedInstanceState: Bundle?) {
      super.onCreate(savedInstanceState)
      setContentView(R.layout.activity_main)
      initFirebase()
      initUser()
      init()
      initFunc()
      
      btn_settings.setOnClickListener {
          val intent = Intent(this, SettingsActivity::class.java)
          startActivity(intent)
      }
      btn_search_main.setOnClickListener {
          if (search_main.text.toString() == &quot;Happy&quot;) {
              val intent = Intent(this, psh::class.java)
              startActivity(intent)
          }
      }
      
      nickname_main.text = USER.username
      Id_main.text = CURRENT_UID
  
      println(USER)
  }
  
  private fun initFunc() {
      if (AUTH.currentUser != null) {
      } else {
          val intent = Intent(this, LoginActivity::class.java)
          startActivity(intent)
      }
  
  }
  
  
  private fun init(){
      btn_settings = findViewById(R.id.btn_settings)
      btn_add_friend = findViewById(R.id.btn_add_friend)
      btn_search_main = findViewById(R.id.btn_search_main)
      search_main = findViewById(R.id.search_main)
      nickname_main = findViewById(R.id.nickname_main)
      Id_main = findViewById(R.id.Id_main)
  }
  
  private fun initUser(){
      REF_DATABASE_ROOT.child(NODE_USERS).child(CURRENT_UID)
              .addListenerForSingleValueEvent(AppValueEventListener{
                  USER = it.getValue(UserModel()::class.java) ?:UserModel()
              })
  
  
  }
  
  fun initFirebase(){
      AUTH = FirebaseAuth.getInstance()
      REF_DATABASE_ROOT = FirebaseDatabase.getInstance(&quot;https://ert-d167-default-rtdb.europe-west1.firebasedatabase.app&quot;).reference
      USER = UserModel()
      CURRENT_UID = AUTH.currentUser?.uid.toString()
  }
      }
      
  class AppValueEventListener (val onSuccess:(DataSnapshot)-&gt;Unit) : ValueEventListener{
      override fun onCancelled(error: DatabaseError) {
  
  }
  override fun onDataChange(snapshot: DataSnapshot) {
      onSuccess(snapshot)
  }
  
  }
  
  data class UserModel(
          var id: String = &quot;&quot;,
          var username: String = &quot;&quot;
  )
  </code></pre>
  <p>If you insert the USER variable into print, it will be User Model(id=, username=)</p>
  <p><a href="https://i.stack.imgur.com/THPdw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/THPdw.png" alt="enter image description here" /></a></p>
  <p>The data in the database is</p>