[44] Results

Golang : Get time.Duration in year, month, week or day

golang date-time-stampelapsed time-duration convert


When using time.Until() or time.Since() functions, the time.Duration type have methods such as Hour(), Minutes(), Nanoseconds() and Seconds() to….... read more

Golang : Convert file unix timestamp to UTC time example

golang json-time nano-seconds milli-seconds time-unix

This tutorial is my own notes from helping out a friend from my working days in Indonesia. Putting it here….... read more

Golang : Overwrite previous output with count down timer

golang overwrite time-ticker

Just a note for myself on how to create a count down timer and how to overwrite previous output. Very….... read more

Golang : ISO8601 Duration Parser example

golang iso8601 duration-parser time

An example on how to parse ISO-8601 duration in string format and convert it to time.Duration type. However, this example….... read more

Golang : How to profile or log time spend on execution?

golang profiling log execution-time

Being able to calculate how long it takes to execute a routine or function is crucial in optimizing a program(this….... read more

Golang : Execute function at intervals or after some delay

golang interval time delay tick

Problem :

You want to execute functions at intervals - such as polling a remote terminal every 30 seconds or….... read more

Golang : Display list of time zones with GMT

golang time time-zones windows linux darwin...

For this tutorial, we will learn how to grab the list of time zones found in Unix/Darwin(Mac)/Linux/Windows and display the….... read more

Golang : Determine if time variables have same calendar day

golang time-equal compare-date

Problem :

You have two or more variables that are of type time.Time and you want to find out if….... read more