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

DateTimeZone::getTransitions doesn't accept optional parameters #2479

Closed
luizribeiro opened this issue Apr 18, 2014 · 10 comments
Closed

DateTimeZone::getTransitions doesn't accept optional parameters #2479

luizribeiro opened this issue Apr 18, 2014 · 10 comments

Comments

@luizribeiro
Copy link

Since PHP 5.3.0, DateTimeZone::getTransitions has been accepting two optional integer parameters: $timestamp_begin and $timestamp_end: http://www.php.net/manual/en/datetimezone.gettransitions.php

HHVM doesn't seem to support it, given that running this on hphpd gives a warning:

  hphpd> =(new DateTimeZone('Atlantic/Azores'))->getTransitions(strtotime('2013'), strtotime('2014'))
  Warning: Too many arguments for DateTimeZone::getTransitions(), expected 0
@LiraNuna LiraNuna self-assigned this Apr 18, 2014
@kevholmes
Copy link

Our application also encounters a similar error due to this issue.

@RyanGerstein
Copy link

Getting the exact same error with the following code:

$transitions = (new DateTimeZone("America/New_York"))->getTransitions(new DateTime("2013-01-01"), new DateTime(date("Y")."-12-31"));
    \nWarning: Too many arguments for DateTimeZone::getTransitions(), expected 0

@fredemmott fredemmott added this to the Lockdown milestone May 12, 2014
@LiraNuna LiraNuna removed their assignment Jun 3, 2014
@GreenRover
Copy link

I have the same issue

@olvlvl
Copy link

olvlvl commented Sep 11, 2014

Same issue with my DateTime extension:

https://travis-ci.org/ICanBoogie/DateTime/jobs/35008457#L48

@mickhrmweb
Copy link

We're also affected, a workaround is in place for us but looking forward to the fix becoming available.

@JoelMarcey JoelMarcey self-assigned this Oct 10, 2014
@fredemmott fredemmott removed this from the Lockdown milestone Nov 3, 2014
@luizribeiro luizribeiro removed this from the Lockdown milestone Nov 3, 2014
@jackdied
Copy link

I've started working on this.

@JoelMarcey
Copy link
Contributor

@jackdied I already have a diff up internally for this.

Internal Diff: D1658643

@JoelMarcey
Copy link
Contributor

I am waiting for the DateTime conversion to HNI before it lands. This is because of some default constants that we need to support that just work better in HNI instead of IDL.

@jackdied
Copy link

Ah, I hadn't seen that. I started a similar in D5620779. Keep an eye on that "int timestamp". I didn't get far enough in the task to chase it down but signed int time_t's are an accident waiting to happen.

edit: /differential/diff/5620779/, just a preview so apparently not in the "D" namespace.

@JoelMarcey
Copy link
Contributor

DateTime is now HNI (Yay!!)

I have a new internal diff since I didn't want to go through the rebase process with the HNI conversion

D1724025

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

No branches or pull requests

10 participants