title: Conversion of date and time to unix timestamp - kotlin
body: <p>In <em>timestamp</em> variable, I want to get the timestampt value with the current hour, minute and second. The currentDataTime gives me the time in this format: <strong>2020-08-28 17:18:02</strong>.
  Currently, the <em>timestamp</em> variable returns me <strong>1598645882634</strong> (the last 3 numbers are the miliseconds) but when I convert it in a online conversor to a Human readable format, it gives me <strong>08/28/2020 @ 8:18pm (UTC)</strong>. The only one problem is the hour and minute tha is 3 hours different because of my zone. How can I convert the date AND <strong>time</strong> to timestamp?</p>
  <pre><code>object DateTime {
      val currentDataTime: String
          @SuppressLint(&quot;SimpleDateFormat&quot;)
          get() {
              val dateFormat = SimpleDateFormat(&quot;yyyy-MM-dd HH:mm:ss&quot;)
              return dateFormat.format(Date())
          }
  
      val timestamp: String
          get(){
              val formatter: DateFormat = SimpleDateFormat(&quot;yyyy-MM-dd HH:mm:ss&quot;)
              val date = formatter.parse(currentDataTime) as Date
              return date.time.toString().dropLast(3) //it is returning 
      }
  }
  </code></pre>