Subject: | 'floating' TZ seems to produce incorrect results |
Using the constructor with no parameters and then parse_datetime() on
'3pm' and 'now' gives two different values, even though it is currently
3pm. '3pm' returns 10am, whereas 'now' gives the correct value.
If I get the date from gmtime and pass the components to DateTime and
pass that to the constructor, I get the same thing. If I use localtime
instead, both 'now' and '3pm' return 10am.
I would just use the proper time zone, but since I'm parsing AJAX user
input, this means someone entering 9002 instead of 2009 will bring the
server to its knees trying to calculate DST offsets (as DateTime's docs
mention.)