-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
isEqualTo(TimeZone::utc()) is not normalized #55
Comments
Related to the PR I linked above, Now, should a Technically it is for |
Hi, this is strange, your original code snippet $whenUtc = ZonedDateTime::parse('2021-07-18T07:00:00Z');
$whenUtc->getTimezone()->isEqualTo(TimeZone::utc()); actually gives me |
oh i am sorry, my code snippet was whack. Lets go with this:
|
Indeed, timezones are compared on their Do you have suggestions on how we should handle this? Should we hardcode the special case of By the way, you can get two representations of UTC in PHP as well: $dt = new DateTime('2021-03-05T11:12:13Z');
echo $dt->getTimeZone()->getName(); // Z
$dt = new DateTime('2021-03-05T11:12:13', new DateTimeZone('etc/UTC'));
echo $dt->getTimeZone()->getName(); // etc/UTC |
And now I'm realizing that |
Sorry, closed by mistake. |
yep, i think it's a flaw in DateTimeZone. I dont understand the difference between region UTC and Offset0 UTC Is there a reason that UTC and etc/UTC are not normalized in the php implementation? |
Hey there,
i got this:
the timezone is then Z
same with etc/UTC which represents the same TimeZone.
Do you want to harmonize those identifiers to represent a Timezone?
e.g.
would be happy to submit a PR
The text was updated successfully, but these errors were encountered: