<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>time based on location on A Place We Can Learn.</title>
    <link>https://blog.cryppy.id/tags/time-based-on-location/</link>
    <description>Recent content in time based on location on A Place We Can Learn.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 20 Jul 2021 22:03:09 +0800</lastBuildDate><atom:link href="https://blog.cryppy.id/tags/time-based-on-location/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Golang - Get Time based on Location</title>
      <link>https://blog.cryppy.id/article/get-time-in-location/</link>
      <pubDate>Tue, 20 Jul 2021 22:03:09 +0800</pubDate>
      
      <guid>https://blog.cryppy.id/article/get-time-in-location/</guid>
      <description>Di golang terdapat built in package time dimana kita bisa mendapatkan/memanipulasi waktu yang diperlukan, lengkapnya time. Untuk mendapatkan format waktu sesuai sama lokasi dimana kita berada, pertama panggil fungsi time.LoadLocation(&amp;ldquo;Asia/Jakarta&amp;rdquo;).
Sebagai tambahan kita panggil fungsi time.Now.In(dengan parameter variable location) yang telah kita definisikan sebelumnya, untuk mendapatkan waktu saat ini/waktu coding ini dijalankan.
import ( &amp;#34;log&amp;#34; &amp;#34;time&amp;#34; ) func TimeHostNow() time.Time { // you can change Asia/Jakarta with your own location. // check on this https://en.</description>
    </item>
    
  </channel>
</rss>
