You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed a small issue with the FileInfo.modTime generation. It is a bit annoying because it prevents proper client-side caching when serving the contents via HTTP.
In the generated file, I find this entry:
FileInfo{
modTime: time.Unix(1504547519, 1504547519143839891),
// etc.
}
However, time.Unix will return 2065-05-09T12:43:58+01:00, the correct value (ignoring time zones) is:
$ stat -c %y ui/build/style.css
2017-09-04 19:51:59.143839891 +0200
While the documentation of time.Unix states
It is valid to pass nsec outside the range [0, 999999999]
it does not mention the implementation detail that it adds nsec / 1e9 to the sec value. Hence the generated FileInfo should be in either of these forms:
Hi,
I've noticed a small issue with the
FileInfo.modTime
generation. It is a bit annoying because it prevents proper client-side caching when serving the contents via HTTP.In the generated file, I find this entry:
However,
time.Unix
will return2065-05-09T12:43:58+01:00
, the correct value (ignoring time zones) is:While the documentation of
time.Unix
statesit does not mention the implementation detail that it adds
nsec / 1e9
to thesec
value. Hence the generated FileInfo should be in either of these forms:I believe the first form should work on any Go release (the crucial part in the implementation of Go1 and Go1.9 has stayed the same).
The text was updated successfully, but these errors were encountered: