Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
time: support for parsing variable time zones #25570
I'm running go1.10 darwin/amd64
What did you do?
I attempted to parse "0800 EST5EDT" using a custom time format "1500 MST7MDT" and only the "EST" portion of the variable timezone was recognized by time.Parse().
What did you expect to see?
A correctly parsed *time.Time type with no errors returned.
What did you see instead?
An error was returned stating that the "5EDT" portion of the variable timezone didn't match the format's "7MDT".
I'm scheduling jobs that reoccur daily, but depend upon when the day starts and ends in that timezone. So, I need both time of day and timezone info for each job. The above format would be convenient by allowing me to store both pieces of information succinctly.