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:
+2
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user