Is there any case where datetime.fromtimestamp returns an incorrect result using pytz?
Question: `pytz` asks you to use the `.astimezone` method for all time conversion to and
from UTC. However, in one special case — `datetime.fromtimestamp` — it looks
like you should be able to use the Python library's datetime methods.

It seems to work here:

    
    
    >>> import datetime
    >>> import pytz
    >>> ambigtime = 1352017800  # http://www.wolframalpha.com/input/?i=1352017800+unix+time+in+Los+Angeles
    >>> amla = pytz.timezone('America/Los_Angeles')
    >>> datetime.datetime.fromtimestamp(ambigtime, tz=amla)
    datetime.datetime(2012, 11, 4, 1, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PDT-1 day, 17:00:00 DST>)
    >>> datetime.datetime.fromtimestamp(ambigtime + 3600, tz=amla)
    datetime.datetime(2012, 11, 4, 1, 30, tzinfo=<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>)
    

Are there situations where `datetime.fromtimestamp` won't give you the correct
results with `pytz` timezones?


Answer: As far as I know, `pytz.timezone()` will give you an instance of
[tzinfo](http://docs.python.org/library/datetime.html#datetime.tzinfo) (or
rather a subclass thereof), and as such is totally fine to use with
`datetime.fromtimestamp()`.

As long as `pytz` has updated zoneinfo files, you can create localized
datetimes using that method. Converting a datetime between two zones however
is really loads easier to do with the `astimezone()` method. If I am correct,
it basically switches the `tzinfo` property on the datetime.

