I am using the Python Arrow package for formatting a date that I've got.
My input is:
datetime=2017-10-01T00:10:00Z and timezone=US/Pacific
My expected output is:
Sun 10/01 @ 6:10pm
I've tried a host of different date time conversions but I always end up with Sun 10/01 @ 12:10AM
which is not time zone dependent.
If I try and say:
x = arrow.Arrow.strptime('2017-10-01T00:10:00Z',
'%Y-%m-%dT%H:%M:%SZ',
tzinfo=tz.gettz('US/Pacific'))
x
is equal to:
<Arrow [2017-10-01T00:10:00-07:00]>
I then say:
x.strftime('%a %m/%d @ %I:%M%p')
and it outputs
Sun 10/01 @ 12:10AM
The Arrow
object knows about the timezone as evidenced by the -7:00
but does not format the date accordingly.
Any ideas?