-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Milestone
Description
Feature request: JSON struct tags could be enhanced to provide the notion of time units since the parser currently assumes everything is ns, causing workarounds of the type that may need to get fixed, as in https://golang.org/cl/7086059 Sample code: http://play.golang.org/p/CZH9ThvhxK What is the expected output? &{Access:12345 Refresh:23456 ExpiresIn:1h0m0s ValidIn:1.234us} 2013-01-21 22:37:40.646947673 -0800 PST 2013-01-21 23:37:40.647083585 -0800 PST What do you see instead? &{Access:12345 Refresh:23456 ExpiresIn:3.6us ValidIn:1.234us} 2009-11-10 23:00:00 +0000 UTC 2009-11-10 23:00:00.0000036 +0000 UTC