update the codebase to latest go src (time, hash, strconv)
[epoint] / pkg / server / server.go
index 9822a64..e3c3d29 100644 (file)
@@ -218,7 +218,7 @@ func ParseDebitCert(d []byte) (cert *document.DebitCert, certid string, err erro
 func NewDebitCert(draftid string, draft *document.Draft) (*document.DebitCert, error) {
        cert := new(document.DebitCert)
        cert.Holder = draft.Drawer
-       cert.Date = time.Seconds()
+       cert.Date = time.Now().Unix()
        cert.Denomination = "epoint"
        cert.Issuer = draft.Issuer
        cert.AuthorizedBy = draft.AuthorizedBy
@@ -278,7 +278,7 @@ func NewCreditCert(draftid string, draft *document.Draft, dcertid string, dcert
        cert := new(document.CreditCert)
        // TODO: get from old cert instead?
        cert.Holder = dcert.Beneficiary
-       cert.Date = time.Seconds()
+       cert.Date = time.Now().Unix()
        // TODO: get these from the cert holder pubkey
        cert.Denomination = "epoint"
        cert.Issuer = draft.Issuer