Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: support for parsing variable time zones #25570

Open
subtlepseudonym opened this Issue May 25, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@subtlepseudonym
Copy link

subtlepseudonym commented May 25, 2018

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".

https://play.golang.org/p/hF01Thqr3p6

@andybons andybons changed the title feature request: support for parsing variable time zones time: support for parsing variable time zones May 25, 2018

@andybons

This comment has been minimized.

Copy link
Member

andybons commented May 25, 2018

Can you give a bit more background on the problem you're trying to solve with a custom time format like that? Thank you.

@andybons andybons added this to the Unplanned milestone May 25, 2018

@subtlepseudonym

This comment has been minimized.

Copy link
Author

subtlepseudonym commented May 29, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.