import time fn main() { // Create a date (time.Time structure) for 2010-09-17 02:11:23 date := time.Time{ year: 2010 month: 9 day: 17 hour: 2 minute: 11 second: 23 } // Convert Date to Unix timestamp unix_timestamp := date.unix_time() println("Unix Timestamp: $unix_timestamp") }
time.Time
unix_time()
time.unix()
time.unix(1514764800)
Time.unix_time()
date.unix_time()
Time.format()
date.format('yyyy-MM-dd HH:mm:ss')
time.now()
time.Time{}
time.Time{year: 2018, month: 7, day: 15, ...}