This is an example date from an Apache log:
[07/Mar/2004:16:47:46 -0800]
I have successfully parsed this into year(int), month(time.Month), day(int), hour(int), minute(int), second(int), and timezone(string).
How can I construct time.Time such that it includes the -0800
time zone offset?
This is what I have so far:
var nativeDate time.Time
nativeDate = time.Date(year, time.Month(month), day, hour, minute, second, 0, ????)
What should I use in place of ????
? time.Local
or time.UTC
is not appropriate here.