andelf/go-curl — Issue #1: Fails to build on go weekly.2011-12-01 and beyond
Author: Miarevo
Created: 2012-01-11 06:38:42+00:00
State: open

go-curl fails to build on go releases after November 30, 2011. The time package was rewritten in [this commit](http://code.google.com/p/go/source/detail?spec=svn5bd1bc51fc04666d96787944bbe14d46cf11f655&r=5bd1bc51fc04666d96787944bbe14d46cf11f655), which causes the following error:

`github.com/andelf/go-curl/curl: build failed: exit status 2
cd "/opt/go/src/pkg/github.com/andelf/go-curl/curl" && "bash gomake -f- install"
6g -I "/opt/go/pkg/linux_amd64" -p github.com/andelf/go-curl/curl -o _go_.6 _obj/callback.cgo1.go _obj/const.cgo1.go _obj/core.cgo1.go _obj/easy.cgo1.go _obj/multi.cgo1.go _obj/share.cgo1.go _obj/_cgo_gotypes.go
core.go:82[_obj/core.cgo1.go:85]: undefined: time.SecondsToUTC
make: *** [_go_.6] Error 1`

core.go:99 can be changed from `return time.SecondsToUTC(int64(t))` to `return time.Unix(int64(t))` to fix this issue. However, time.Unix() returns a time.Time value in the local timezone unlike time.SecondsToUTC() which returns a time.Time value in the UTC timezone.