package util

import (
	"crypto/md5"
	"encoding/hex"
	"time"
)

func NowTimeString()string{
	tm := time.Now()
	t := tm.Format("2006-01-02 15:04:05")
	return t
}

func NowTimeDayString()string{
	tm := time.Now()
	t := tm.Format("2006-01-02")
	return t
}

func Md5(str string) string {
	hash := md5.New()
	hash.Write([]byte(str) )
	s := hex.EncodeToString(hash.Sum(nil))
	return s
}