Handle timezone strings with strippable contents properly
commit8f69d62001e78ffdd43b53b9ca0ce1bdac9e6bb8
authorMichael O'Farrell <michaelofarrell@fb.com>
Wed, 21 Apr 2021 20:01:16 +0000 (21 13:01 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 21 Apr 2021 20:02:53 +0000 (21 13:02 -0700)
treecdd5504586f6dbf9f472ac4f2ebfcc13c97aca42
parent733ffe5b36bfc2532c4d0c0ca0747676db6caa8a
Handle timezone strings with strippable contents properly

Summary:
We were asserting that we would not identify a timezone id in a timezone string
if our specialized logic had not detected one earlier.  This could still arise
if there were characters at the end of the timezone string that timelib strips.

See timelib's stripping behavior here:
https://github.com/derickr/timelib/blob/00fcceca7eaf28b650755ad6e7bfe75473125705/parse_date.re#L743-L745

Reviewed By: ricklavoie

Differential Revision: D27910402

fbshipit-source-id: 1db38b0a281edbb919d7371cf5549fe99a390cb6
hphp/runtime/base/timezone.cpp
hphp/test/slow/ext_datetime/timezone_from_stripped_str_id.php [new file with mode: 0644]
hphp/test/slow/ext_datetime/timezone_from_stripped_str_id.php.expectf [new file with mode: 0644]