Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot get correct dates #41

Open
migratingCoconuts opened this issue Apr 2, 2019 · 0 comments
Open

cannot get correct dates #41

migratingCoconuts opened this issue Apr 2, 2019 · 0 comments

Comments

@migratingCoconuts
Copy link

CreationDate and ModificationDate is returning "0001-01-01 00:00:00 +0000 UTC".

╰─$ go env
GOARCH="amd64"
GOBIN="/Users/mattb/go/bin"
GOCACHE="/Users/mattb/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mattb/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6s/5_jg3hdx52d1t4gf1tky_2b80000gq/

package main

import (
"fmt"
"log"

"github.com/keybase/go-keychain"

)

func main() {
query := keychain.NewItem()
query.SetSecClass(keychain.SecClassGenericPassword)
query.SetService("itrac")
query.SetMatchLimit(keychain.MatchLimitOne)
query.SetReturnData(true)
results, err := keychain.QueryItem(query)
if err != nil {
log.Fatalln(err)
}
fmt.Println(results[0].ModificationDate)
fmt.Println(results[0].CreationDate)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant