Generated from Go source

Go API reference

Exported declarations for github.com/chengchuu/asiatz. This page is generated with the Go parser and documentation packages; internal site tooling is intentionally excluded.

import asiatz "github.com/chengchuu/asiatz"

Package asiatz converts fixed-offset Asian local times and date-times to UTC. Clock-time functions accept and return strict 24-hour HH:mm strings. Date-time functions accept and return strict YYYY-MM-DD HH:mm:ss strings and preserve calendar rollover. The named helpers use documented fixed UTC offsets; they do not apply daylight-saving transitions, historical offset changes, or IANA time-zone database rules.

Exported declarations

Follow a declaration link or browse the complete reference below. Signatures and prose come from the current public package source.

Constant

DateTimeLayout

const DateTimeLayout = "2006-01-02 15:04:05"

DateTimeLayout is the strict layout accepted and returned by date-time conversion functions.

Function

BangkokDateTimeToUTC

func BangkokDateTimeToUTC(bangkokDateTime string) (string, error)

BangkokDateTimeToUTC converts a Bangkok fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

BangkokToUTC

func BangkokToUTC(bangkokTime string) (string, error)

BangkokToUTC converts a Bangkok time string (HH:mm) to UTC time string (HH:mm). For example, "07:00" in Bangkok is equivalent to "00:00" in UTC.

Function

BeijingDateTimeToUTC

func BeijingDateTimeToUTC(beijingDateTime string) (string, error)

BeijingDateTimeToUTC converts a Beijing fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

BeijingToUTC

func BeijingToUTC(beijingTime string) (string, error)

BeijingToUTC converts a Beijing time string (HH:mm) to UTC time string (HH:mm). For example, "08:00" in Beijing is equivalent to "00:00" in UTC.

Function

DelhiDateTimeToUTC

func DelhiDateTimeToUTC(delhiDateTime string) (string, error)

DelhiDateTimeToUTC converts a Delhi fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

DelhiToUTC

func DelhiToUTC(delhiTime string) (string, error)

DelhiToUTC converts a Delhi time string (HH:mm) to UTC time string (HH:mm). For example, "05:30" in Delhi is equivalent to "00:00" in UTC.

Function

DubaiDateTimeToUTC

func DubaiDateTimeToUTC(dubaiDateTime string) (string, error)

DubaiDateTimeToUTC converts a Dubai fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

DubaiToUTC

func DubaiToUTC(dubaiTime string) (string, error)

DubaiToUTC converts a Dubai time string (HH:mm) to UTC time string (HH:mm). For example, "04:00" in Dubai is equivalent to "00:00" in UTC.

Function

HongKongDateTimeToUTC

func HongKongDateTimeToUTC(hongKongDateTime string) (string, error)

HongKongDateTimeToUTC converts a Hong Kong fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

HongKongToUTC

func HongKongToUTC(hongKongTime string) (string, error)

HongKongToUTC converts a Hong Kong time string (HH:mm) to UTC time string (HH:mm). For example, "08:00" in Hong Kong is equivalent to "00:00" in UTC.

Function

JakartaDateTimeToUTC

func JakartaDateTimeToUTC(jakartaDateTime string) (string, error)

JakartaDateTimeToUTC converts a Jakarta fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

JakartaToUTC

func JakartaToUTC(jakartaTime string) (string, error)

JakartaToUTC converts a Jakarta time string (HH:mm) to UTC time string (HH:mm). For example, "07:00" in Jakarta is equivalent to "00:00" in UTC.

Function

PyongyangDateTimeToUTC

func PyongyangDateTimeToUTC(pyongyangDateTime string) (string, error)

PyongyangDateTimeToUTC converts a Pyongyang fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

PyongyangToUTC

func PyongyangToUTC(pyongyangTime string) (string, error)

PyongyangToUTC converts a Pyongyang time string (HH:mm) to UTC time string (HH:mm). For example, "09:00" in Pyongyang is equivalent to "00:00" in UTC.

Function

SeoulDateTimeToUTC

func SeoulDateTimeToUTC(seoulDateTime string) (string, error)

SeoulDateTimeToUTC converts a Seoul fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

SeoulToUTC

func SeoulToUTC(seoulTime string) (string, error)

SeoulToUTC converts a Seoul time string (HH:mm) to UTC time string (HH:mm). For example, "09:00" in Seoul is equivalent to "00:00" in UTC.

Function

ShanghaiDateTimeToUTC

func ShanghaiDateTimeToUTC(shanghaiDateTime string) (string, error)

ShanghaiDateTimeToUTC converts a Shanghai fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

ShanghaiToUTC

func ShanghaiToUTC(shanghaiTime string) (string, error)

ShanghaiToUTC converts a Shanghai time string (HH:mm) to UTC time string (HH:mm). For example, "08:00" in Shanghai is equivalent to "00:00" in UTC.

Function

SingaporeDateTimeToUTC

func SingaporeDateTimeToUTC(singaporeDateTime string) (string, error)

SingaporeDateTimeToUTC converts a Singapore fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

SingaporeToUTC

func SingaporeToUTC(singaporeTime string) (string, error)

SingaporeToUTC converts a Singapore time string (HH:mm) to UTC time string (HH:mm). For example, "08:00" in Singapore is equivalent to "00:00" in UTC.

Function

TaipeiDateTimeToUTC

func TaipeiDateTimeToUTC(taipeiDateTime string) (string, error)

TaipeiDateTimeToUTC converts a Taipei fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

TaipeiToUTC

func TaipeiToUTC(taipeiTime string) (string, error)

TaipeiToUTC converts a Taipei time string (HH:mm) to UTC time string (HH:mm). For example, "08:00" in Taipei is equivalent to "00:00" in UTC.

Function

ToUTC

func ToUTC(timezoneOffset float64, timeString string) (string, error)

ToUTC converts an HH:mm clock time at timezoneOffset hours east of UTC to an HH:mm UTC clock time. The offset must resolve to a whole number of minutes.

Function

ToUTCDateTime

func ToUTCDateTime(timezoneOffset float64, dateTimeString string) (string, error)

ToUTCDateTime converts a local date-time at timezoneOffset hours east of UTC to a UTC date-time. Input and output use DateTimeLayout. The offset must resolve to a whole number of minutes. This function applies a fixed offset only. It does not use daylight-saving transitions, historical offset changes, or the IANA time-zone database.

Function

TokyoDateTimeToUTC

func TokyoDateTimeToUTC(tokyoDateTime string) (string, error)

TokyoDateTimeToUTC converts a Tokyo fixed-offset date-time in DateTimeLayout format to UTC in the same format.

Function

TokyoToUTC

func TokyoToUTC(tokyoTime string) (string, error)

TokyoToUTC converts a Tokyo time string (HH:mm) to UTC time string (HH:mm). For example, "09:00" in Tokyo is equivalent to "00:00" in UTC.

Need a runnable starting point? Read the source-derived examples or open the basic Go example on GitHub.