Provide own implementation of Local* (#558)

* Reduces the public API.
* Reuses optimized parsing functions.
* Removes reliance on Google code under Apache license.
This commit is contained in:
Thomas Pelletier
2021-06-08 20:27:05 -04:00
committed by GitHub
parent 773f10110c
commit f6b38c33b7
6 changed files with 186 additions and 754 deletions
+2 -3
View File
@@ -720,8 +720,7 @@ func (d *decoder) unmarshalLocalDate(value *ast.Node, v reflect.Value) error {
}
if v.Type() == timeType {
cast := ld.In(time.Local)
cast := ld.AsTime(time.Local)
v.Set(reflect.ValueOf(cast))
return nil
}
@@ -742,7 +741,7 @@ func (d *decoder) unmarshalLocalDateTime(value *ast.Node, v reflect.Value) error
}
if v.Type() == timeType {
cast := ldt.In(time.Local)
cast := ldt.AsTime(time.Local)
v.Set(reflect.ValueOf(cast))
return nil