|
@@ -13,7 +13,7 @@ func init() {
|
|
|
|
|
|
|
|
const (
|
|
const (
|
|
|
timeFormat = "2006-01-02 15:04:05"
|
|
timeFormat = "2006-01-02 15:04:05"
|
|
|
- zeroTime = "0001-01-01 00:00:00"
|
|
|
|
|
|
|
+ zeroTime = "1970-01-01 00:00:00"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
func NowLocal() LocalTime {
|
|
func NowLocal() LocalTime {
|
|
@@ -42,7 +42,7 @@ func (t *LocalTime) UnmarshalJSON(data []byte) error {
|
|
|
|
|
|
|
|
if len(dataStr) > 19 {
|
|
if len(dataStr) > 19 {
|
|
|
dataStr = dataStr[0:19]
|
|
dataStr = dataStr[0:19]
|
|
|
- if dataStr == "0001-01-01 00:00:00" {
|
|
|
|
|
|
|
+ if dataStr == "1970-01-01 00:00:00" {
|
|
|
dataStr = timeFormat
|
|
dataStr = timeFormat
|
|
|
}
|
|
}
|
|
|
} else if len(dataStr) == 10 {
|
|
} else if len(dataStr) == 10 {
|