Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Author: admin

Understanding time and date in Go (Golang) – Complete Guide

Posted on February 1, 2020January 8, 2021 by admin

Note: If you are interested in learning Golang, then for that we have a golang comprehensive tutorial series. Do check it out – Golang Comprehensive Tutorial Series. Now let’s see the current tutorial….

Date in Go (Golang)

Posted on February 1, 2020February 1, 2020 by admin

Date in Go is represented using time.Time struct only. There is no separate Date struct in Go. time.Date function can be used to construct a date. This function returns the time which…

Convert Unix TimeStamp to time.Time in Go (Golang)

Posted on February 1, 2020February 1, 2020 by admin

Time can be represented in GO in both time.Time and Unix Timestamp format. The Unix Timestamp also known as Epoch Time is the number of seconds elapsed since 00:00:00 UTC on 1 January…

Add or Subtract to time in Go (Golang)

Posted on January 31, 2020March 9, 2020 by admin

Overview time package in golang defines two ways of adding or subtracting to a time. Add function – It is used to add/subtract a duration to time t. Since duration can be…

Understanding Duration in time package in Go (Golang)

Posted on January 31, 2020January 31, 2020 by admin

duration is the time that has elapsed between two instants of time. It is represented as int64nanosecond count. So duration is nothing in Go but just a number representing time in nanoseconds…

Convert time between different timezones in Go (Golang)

Posted on January 31, 2020January 31, 2020 by admin

Every time.Time object has an associated location value. When you change the location of any time.Time object to any other location, then that instant of time is not changed. Only the location…

Get current time and date of different timezones in Go (Golang)

Posted on January 31, 2020February 1, 2020 by admin

time package has a LoadLocation(name string) function which can be used to load a location of anywhere. Once you have the location, then In function can be used to change the location…

Time Difference between two time value in Go (Golang)

Posted on January 31, 2020January 31, 2020 by admin

Overview In Go time is represented by the time.Time struct. It struct has a method Sub which can be used to get the difference between two different time values. The Sub function…

Parse Time in Golang

Posted on January 31, 2020January 31, 2020 by admin

Overview Parse function of time package in golang can be used to parse the string representation of time into time.Time object Package link – https://golang.org/pkg/time/#Parse If you have worked with time/date formatting/parsing…

Time Conversion in Go (Golang)

Posted on January 27, 2020January 27, 2020 by admin

Overview Time can be represented in GO in below 5 formats: time.Time object Unix Time (Also known as Epoch Time) – It is the number of seconds elapsed since 00:00:00 UTC on 1…

Posts pagination

Previous 1 … 52 53 54 … 62 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme