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

Allow constructing a FixedTimeZone from Dates.UTC and allow passing it to ZonedDateTime #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iamed2
Copy link
Member

@iamed2 iamed2 commented Dec 21, 2017

No description provided.

@@ -3,6 +3,11 @@ import Compat.Dates
utc = FixedTimeZone("UTC")
warsaw = resolve("Europe/Warsaw", tzdata["europe"]...)

# Converting from the stdlib UTC
@test FixedTimeZone(UTC()) == utc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I want to support using an instance of UTC as this is never actually utilized in Base. In fact they only ever seem to use the type so maybe the type should be redefined as abstract or rethought.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your interface currently says it accepts any TimeZone :P

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. This happens to be the only TimeZone I don't like 😆

@omus
Copy link
Member

omus commented Jan 30, 2018

@iamed2 is this something you actually need? Dates only needs this for now(::Type{UTC}) and it's never used as an instance.

@iamed2
Copy link
Member Author

iamed2 commented Jan 30, 2018

It's not something I need but I do keep running into this when trying to create a UTC ZDT and using the wrong UTC (there are so many)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants