• This project
    • Loading...
  • Sign in

2021-1-capstone-design2 / 2016104120

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • 2016104120
  • src
  • server
  • types.go
  • Ma Suhyeon's avatar
    Change framework to echo · adf3ded0
    adf3ded0
    Ma Suhyeon authored 2021-04-01 13:18:05 +0900
types.go 277 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package main

import (
	"time"
)

type Time time.Time

func (t *Time) Scan(v interface{}) error {
	p, err := time.Parse("2006-01-02 15:04:05", string(v.([]byte)))
	*t = Time(p)
	return err
}

func (t *Time) MarshalJSON() ([]byte, error) {
	return time.Time(*t).MarshalJSON()
}